pub struct TransitionSpec {
pub from: Vec<Name>,
pub except: Vec<Name>,
pub to: Name,
pub when: Cond<Name>,
pub priority: i32,
pub breaks_lock: bool,
pub restart: bool,
}Expand description
A transition by names.
Fields§
§from: Vec<Name>Source states; empty means any state.
except: Vec<Name>With from empty: states it does not apply to.
to: NameTarget state.
when: Cond<Name>When it fires.
priority: i32Higher goes first.
breaks_lock: boolConsidered while the current state is locked.
restart: boolMay restart the state it starts from.
Implementations§
Source§impl TransitionSpec
impl TransitionSpec
Sourcepub fn new<S: Into<Name>>(
from: impl IntoIterator<Item = S>,
to: impl Into<Name>,
when: Cond<Name>,
) -> Self
pub fn new<S: Into<Name>>( from: impl IntoIterator<Item = S>, to: impl Into<Name>, when: Cond<Name>, ) -> Self
From any of from to to when when holds.
Sourcepub fn any(to: impl Into<Name>, when: Cond<Name>) -> Self
pub fn any(to: impl Into<Name>, when: Cond<Name>) -> Self
From any state to to when when holds.
Sourcepub fn except<S: Into<Name>>(self, states: impl IntoIterator<Item = S>) -> Self
pub fn except<S: Into<Name>>(self, states: impl IntoIterator<Item = S>) -> Self
Not from these states (with TransitionSpec::any).
Sourcepub fn breaks_lock(self) -> Self
pub fn breaks_lock(self) -> Self
Fire even while the current state is locked.
Trait Implementations§
Source§impl Clone for TransitionSpec
impl Clone for TransitionSpec
Source§impl Debug for TransitionSpec
impl Debug for TransitionSpec
Source§impl PartialEq for TransitionSpec
impl PartialEq for TransitionSpec
impl StructuralPartialEq for TransitionSpec
Auto Trait Implementations§
impl Freeze for TransitionSpec
impl RefUnwindSafe for TransitionSpec
impl Send for TransitionSpec
impl Sync for TransitionSpec
impl Unpin for TransitionSpec
impl UnsafeUnpin for TransitionSpec
impl UnwindSafe for TransitionSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
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.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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.