Selector

Trait Selector 

Source
pub trait Selector<State> {
    type Output;

    // Required method
    fn select(&self, state: State) -> Option<Self::Output>;
}
Expand description

Selector defines what a task created by ReactiveTask will do.

Required Associated Types§

Required Methods§

Source

fn select(&self, state: State) -> Option<Self::Output>

The Option value in the output indicates that Future is still pending if Some, or that the task is ready if Some.

Implementors§

Source§

impl<State, Output, F> Selector<State> for F
where F: Fn(State) -> Option<Output> + Unpin,

Source§

type Output = Output