Trait Selector

Source
pub trait Selector: PartialEq {
    // Required method
    fn select(states: &BounceStates) -> Rc<Self>;
}
Expand description

An auto-updating derived state.

It will automatically update when any selected state changes and only notifies registered hooks when prev_value != next_value.

Required Methods§

Source

fn select(states: &BounceStates) -> Rc<Self>

Selects self from existing bounce states.

§Panics

states.get_selector_value::<T>() will panic if you are trying to create a loop by selecting current selector again.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§