pub struct StateMachineFactory<S, E, C>{
pub(crate) machines: HashMap<String, StateMachine<S, E, C>>,
}Expand description
Factory for managing multiple state machines
Fields§
§machines: HashMap<String, StateMachine<S, E, C>>Implementations§
Source§impl<S, E, C> StateMachineFactory<S, E, C>
impl<S, E, C> StateMachineFactory<S, E, C>
pub fn new() -> Self
pub fn register(&mut self, machine: StateMachine<S, E, C>)
pub fn get(&self, id: &str) -> Option<&StateMachine<S, E, C>>
pub fn get_mut(&mut self, id: &str) -> Option<&mut StateMachine<S, E, C>>
pub fn remove(&mut self, id: &str) -> Option<StateMachine<S, E, C>>
pub fn list_ids(&self) -> Vec<&str>
Trait Implementations§
Auto Trait Implementations§
impl<S, E, C> !RefUnwindSafe for StateMachineFactory<S, E, C>
impl<S, E, C> !UnwindSafe for StateMachineFactory<S, E, C>
impl<S, E, C> Freeze for StateMachineFactory<S, E, C>
impl<S, E, C> Send for StateMachineFactory<S, E, C>
impl<S, E, C> Sync for StateMachineFactory<S, E, C>
impl<S, E, C> Unpin for StateMachineFactory<S, E, C>
impl<S, E, C> UnsafeUnpin for StateMachineFactory<S, E, C>
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