Trait iced::application::Update

source ·
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§

source

fn update( &self, state: &mut State, message: Message, ) -> impl Into<Task<Message>>

Processes the message and updates the state of the Application.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<State, Message> Update<State, Message> for ()

source§

fn update( &self, _state: &mut State, _message: Message, ) -> impl Into<Task<Message>>

Implementors§

source§

impl<T, State, Message, C> Update<State, Message> for T
where T: Fn(&mut State, Message) -> C, C: Into<Task<Message>>,