[][src]Struct finny::FsmFrontend

pub struct FsmFrontend<F, Q> where
    F: FsmBackend,
    Q: FsmEventQueue<F>, 
{ pub queue: Q, pub backend: FsmBackendImpl<F>, }

The frontend of a state machine which also includes environmental services like queues and inspection. The usual way to use the FSM.

Fields

queue: Qbackend: FsmBackendImpl<F>

Implementations

impl<F, Q> FsmFrontend<F, Q> where
    F: FsmBackend,
    Q: FsmEventQueue<F>, 
[src]

pub fn start(&mut self) -> FsmResult<()>[src]

Start the FSM, initiates the transition to the initial state.

pub fn dispatch<E>(&mut self, event: E) -> FsmResult<()> where
    E: Into<<F as FsmBackend>::Events>, 
[src]

Dispatch this event and run it to completition.

pub fn dispatch_single_event(
    &mut self,
    event: &FsmEvent<<F as FsmBackend>::Events>
) -> FsmResult<()>
[src]

Dispatch only this event, do not run it to completition.

Methods from Deref<Target = FsmBackendImpl<F>>

pub fn get_context(&self) -> &<F as FsmBackend>::Context[src]

pub fn get_current_states(
    &self
) -> <<F as FsmBackend>::States as FsmStates>::CurrentState
[src]

pub fn get_state<S>(&self) -> &S

Notable traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;
where
    <F as FsmBackend>::States: AsRef<S>, 
[src]

Trait Implementations

impl<F, Q> Deref for FsmFrontend<F, Q> where
    F: FsmBackend,
    Q: FsmEventQueue<F>, 
[src]

type Target = FsmBackendImpl<F>

The resulting type after dereferencing.

Auto Trait Implementations

impl<F, Q> RefUnwindSafe for FsmFrontend<F, Q> where
    Q: RefUnwindSafe,
    <F as FsmBackend>::Context: RefUnwindSafe,
    <<F as FsmBackend>::States as FsmStates>::CurrentState: RefUnwindSafe,
    <F as FsmBackend>::States: RefUnwindSafe
[src]

impl<F, Q> Send for FsmFrontend<F, Q> where
    Q: Send,
    <F as FsmBackend>::Context: Send,
    <<F as FsmBackend>::States as FsmStates>::CurrentState: Send,
    <F as FsmBackend>::States: Send
[src]

impl<F, Q> Sync for FsmFrontend<F, Q> where
    Q: Sync,
    <F as FsmBackend>::Context: Sync,
    <<F as FsmBackend>::States as FsmStates>::CurrentState: Sync,
    <F as FsmBackend>::States: Sync
[src]

impl<F, Q> Unpin for FsmFrontend<F, Q> where
    Q: Unpin,
    <F as FsmBackend>::Context: Unpin,
    <<F as FsmBackend>::States as FsmStates>::CurrentState: Unpin,
    <F as FsmBackend>::States: Unpin
[src]

impl<F, Q> UnwindSafe for FsmFrontend<F, Q> where
    Q: UnwindSafe,
    <F as FsmBackend>::Context: UnwindSafe,
    <<F as FsmBackend>::States as FsmStates>::CurrentState: UnwindSafe,
    <F as FsmBackend>::States: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.