pub struct StateDef<T>where
T: FsmIntegration<T>,{
pub state: Box<dyn State<T>>,
pub transitions: Transitions<T>,
}Expand description
Represents the fsm state definition
Fields§
§state: Box<dyn State<T>>Represens the state
transitions: Transitions<T>Represens the state transitions
Implementations§
Source§impl<T> StateDef<T>where
T: FsmIntegration<T>,
impl<T> StateDef<T>where
T: FsmIntegration<T>,
Sourcepub fn new(state: impl State<T> + 'static, transitions: Transitions<T>) -> Self
pub fn new(state: impl State<T> + 'static, transitions: Transitions<T>) -> Self
Create new state definition
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for StateDef<T>
impl<T> !RefUnwindSafe for StateDef<T>
impl<T> !Send for StateDef<T>
impl<T> !Sync for StateDef<T>
impl<T> Unpin for StateDef<T>
impl<T> !UnwindSafe for StateDef<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more