pub trait Update<State, Message> {
// Required method
fn update(
&self,
state: &mut State,
message: Message,
) -> impl Into<Task<Message>>;
}Expand description
The update logic of some Application.
This trait allows the application builder to take any closure that
returns any Into<Task<Message>>.
Required Methods§
Sourcefn update(
&self,
state: &mut State,
message: Message,
) -> impl Into<Task<Message>>
fn update( &self, state: &mut State, message: Message, ) -> impl Into<Task<Message>>
Processes the message and updates the state of the Application.
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.