MessageMapper

Trait MessageMapper 

Source
pub trait MessageMapper<Msg, Val> {
    // Required method
    fn map<'ctx>(&self, cx: Scope<'ctx>, msg: Msg, original: &'ctx Signal<Val>);
}
Expand description

Trait that maps a message and an original state value to a new value. Implementors of this trait can implement all of their state management logic in one place.

Required Methods§

Source

fn map<'ctx>(&self, cx: Scope<'ctx>, msg: Msg, original: &'ctx Signal<Val>)

Implementors§