rs::receiver

Type Alias State

Source
pub type State = Threaded<Application>;

Aliased Type§

struct State {
    thread: Sender<Event>,
}

Fields§

§thread: Sender<Event>

Waits for external events

Implementations

Source§

impl<S> Threaded<S>
where S: ActorState + Send + 'static, S::Event: Send, <S::Outcome as Outcome>::Commands: Send,

Source

pub fn new( ui: Sender<<<S as ActorState>::Outcome as Outcome>::Commands>, initial_state: S, ) -> Self

Source

pub fn send(&self, event: S::Event) -> Result<(), SendError<S::Event>>

Source

fn handle_loop_event( loop_sender: &Sender<S::Event>, state: State<S>, event: S::Event, ui: &Sender<<<S as ActorState>::Outcome as Outcome>::Commands>, ) -> State<S>

Source

fn schedule_timeout_wake(loop_sender: &Sender<S::Event>, when: Instant)

Trait Implementations

Source§

impl<S> Clone for Threaded<S>
where S: ActorState + Send + Clone, S::Event: Send + Clone, <S::Outcome as Outcome>::Commands: Send,

Source§

fn clone(&self) -> Threaded<S>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more