Trait tuirealm::Update

source ·
pub trait Update<Msg>
where Msg: PartialEq,
{ // Required method fn update(&mut self, msg: Option<Msg>) -> Option<Msg>; }
Expand description

The update trait defines the prototype of the function to be used to handle the events coming from the View.

Required Methods§

source

fn update(&mut self, msg: Option<Msg>) -> Option<Msg>

update the current state handling a message from the view. This function may return a Message, so this function has to be intended to be call recursively if necessary

Implementors§