Struct rust_rpg_toolkit::prelude::ActorBehaviorFamily [−][src]
pub struct ActorBehaviorFamily;
Trait Implementations
type Base = dyn ActorBehavior
type Base = dyn ActorBehavior
The user-facing interface for the Mode
that will be exposed via the Automaton::borrow_mode()
and
Automaton::borrow_mode_mut()
functions. This can be either a concrete type or a dyn Trait
, depending on
whether Self::Mode
is a pointer type or not. Read more
type Mode = Box<dyn ActorBehavior>
type Mode = Box<dyn ActorBehavior>
The actual type that will be stored in Automaton
and moved into the Automaton::next()
function. For a
Family
where Self::Base
is a concrete type, this should be set to the same type as Self::Base
. On
the other hand, if Self::Base
is a dyn Trait
, this should usually be set to some pointer type capable of
storing Self::Base
, e.g. Box<Self::Base>
or Rc<Self::Base>
. Read more
Convenience function allowing an Automaton
to be created for this Family
type. Note that this is shorthand
for Automaton::new()
, and therefore Self::Mode
must implement Default
. See
Automaton::new()
for more details. Read more
Convenience function that returns a new Automaton
for this Family
type with the specified mode
as current.
Note that this is shorthand for Automaton::with_mode()
. See
Automaton::with_mode()
for more details. Read more
Auto Trait Implementations
impl RefUnwindSafe for ActorBehaviorFamily
impl Send for ActorBehaviorFamily
impl Sync for ActorBehaviorFamily
impl Unpin for ActorBehaviorFamily
impl UnwindSafe for ActorBehaviorFamily
Blanket Implementations
Mutably borrows from an owned value. Read more