pub struct AgentWorldActions<'w> { /* private fields */ }
Expand description

Modify actions using World.

Trait Implementations§

source§

impl ModifyActions for AgentWorldActions<'_>

source§

fn start(&mut self, start: bool) -> &mut Self

Specify if the next action in the queue should start when new actions are added. The next action will only start if nothing is currently running. Default is true.
source§

fn order(&mut self, order: AddOrder) -> &mut Self

Specify the queue order for actions to be added. Default is AddOrder::Back.
source§

fn repeat(&mut self, repeat: Repeat) -> &mut Self

Specify the repeat configuration for actions to be added. Default is Repeat::None.
source§

fn add(&mut self, action: impl Into<Box<dyn Action>>) -> &mut Self

Adds a single action to the queue.
source§

fn add_sequence( &mut self, actions: impl DoubleEndedIterator<Item = Box<dyn Action>> + Send + Sync + 'static ) -> &mut Self

Adds a collection of actions to the queue that are executed sequentially, i.e. one by one.
source§

fn add_parallel( &mut self, actions: impl Iterator<Item = Box<dyn Action>> + Send + Sync + 'static ) -> &mut Self

Adds a collection of actions to the queue that are executed in parallel, i.e. all at once.
source§

fn add_linked( &mut self, f: impl FnOnce(&mut LinkedActionsBuilder) + Send + Sync + 'static ) -> &mut Self

Adds a collection of linked actions to the queue that are executed sequentially. Linked actions have the property that if any of them are canceled, then the remaining actions in the collection are ignored.
source§

fn execute(&mut self) -> &mut Self

Starts the next action in the queue, but only if there is no action currently running.
source§

fn next(&mut self) -> &mut Self

Starts the next action in the queue. Current action is stopped as canceled.
source§

fn cancel(&mut self) -> &mut Self

Stops the current action as canceled. To resume the action queue, call next.
source§

fn pause(&mut self) -> &mut Self

Stops the current action as paused. To resume the action queue, call next.
source§

fn skip(&mut self) -> &mut Self

Skips the next action in the queue.
source§

fn clear(&mut self) -> &mut Self

Clears the action queue. Current action is stopped as canceled.

Auto Trait Implementations§

§

impl<'w> !RefUnwindSafe for AgentWorldActions<'w>

§

impl<'w> Send for AgentWorldActions<'w>

§

impl<'w> Sync for AgentWorldActions<'w>

§

impl<'w> Unpin for AgentWorldActions<'w>

§

impl<'w> !UnwindSafe for AgentWorldActions<'w>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync + 'static>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Event for Twhere T: Send + Sync + 'static,