pub struct StateSet(/* private fields */);Expand description
A superposition of multiple State’s.
You must use Self::scope to set the total number of states.
Implementations§
Source§impl StateSet
impl StateSet
Sourcepub fn scope<R>(state_count: u32, scope: impl FnOnce() -> R) -> R
pub fn scope<R>(state_count: u32, scope: impl FnOnce() -> R) -> R
All StateSet’s created in scope will have state_count states.
Sourcepub fn with_states(states: &[State]) -> Self
pub fn with_states(states: &[State]) -> Self
Creates a superposition of states.
Sourcepub fn len() -> u32
pub fn len() -> u32
The total number of states, as defined by Self::scope.
Sourcepub fn remove_all(&mut self, states: &Self)
pub fn remove_all(&mut self, states: &Self)
Remove all states from the superposition.
Trait Implementations§
impl Eq for StateSet
impl StructuralPartialEq for StateSet
Auto Trait Implementations§
impl Freeze for StateSet
impl RefUnwindSafe for StateSet
impl Send for StateSet
impl Sync for StateSet
impl Unpin for StateSet
impl UnwindSafe for StateSet
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