pub struct Transition<State, Effect>{
pub condition: Option<Predicate>,
pub to: State,
pub effect: Option<Effect>,
}Expand description
Transition to next state which is validated by condition
Fields§
§condition: Option<Predicate>Predicate that validates current character of stream. If None then transition is unconditional (i.e. succeeds for every input character)
to: StateNext state
effect: Option<Effect>Side effect that is generated after successful validation of transition If None then no effect is generated
Implementations§
Auto Trait Implementations§
impl<State, Effect> Freeze for Transition<State, Effect>
impl<State, Effect> RefUnwindSafe for Transition<State, Effect>where
State: RefUnwindSafe,
Effect: RefUnwindSafe,
impl<State, Effect> Send for Transition<State, Effect>
impl<State, Effect> Sync for Transition<State, Effect>
impl<State, Effect> Unpin for Transition<State, Effect>
impl<State, Effect> UnwindSafe for Transition<State, Effect>where
State: UnwindSafe,
Effect: UnwindSafe,
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