Trait bounce::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.

Object Safety§

This trait is not object safe.

Implementors§