pub trait UpdateFn<State, Message> {
// Required method
fn update(
&self,
state: &mut State,
message: Message,
now: Instant,
) -> impl Into<Task<Message>>;
}Expand description
The update logic of some timed Application.
This is like application::UpdateFn,
but it also takes an Instant.
Required Methods§
Sourcefn update(
&self,
state: &mut State,
message: Message,
now: Instant,
) -> impl Into<Task<Message>>
fn update( &self, state: &mut State, message: Message, now: Instant, ) -> 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.