#[cfg(feature = "default-selectors")]
pub mod repeat;
#[cfg(feature = "default-selectors")]
pub mod wait;
#[cfg(feature = "default-selectors")]
pub mod delay;
#[cfg(feature = "default-selectors")]
pub mod once;
pub trait Selector<State> {
type Output;
fn select(&self, state: State) -> Option<Self::Output>;
}
impl<State, Output, F> Selector<State> for F
where F: Fn(State) -> Option<Output> + Unpin
{
type Output = Output;
#[inline]
fn select(&self, state: State) -> Option<Self::Output> {
(self)(state)
}
}