[][src]Struct pakr_fsm::Reactor

pub struct Reactor<F: FSM> { /* fields omitted */ }

Reactor is FSM handle to interact and monitor

Implementations

impl<F: FSM> Reactor<F>[src]

pub fn new() -> Self[src]

Create new Reactor.

Spawns associated FSM in separate thread, itializes it by calling its new and setting state to default.

pub fn join(self) -> Result<Option<<F as FSM>::Response>>[src]

Waits for FSM to complete.

Returns response of the last transition

pub fn send(
    &self,
    ev: <F as FSM>::Event
) -> Result<(), SendError<<F as FSM>::Event>>
[src]

Send event to FSM

pub fn get_sender(&self) -> Sender<F::Event>[src]

Clone send endpoint of FSM channel to be used in other places.

Auto Trait Implementations

impl<F> !RefUnwindSafe for Reactor<F>

impl<F> Send for Reactor<F> where
    <F as FSM>::Event: Send

impl<F> !Sync for Reactor<F>

impl<F> Unpin for Reactor<F>

impl<F> !UnwindSafe for Reactor<F>

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.