pub trait BootFn<State, Message> {
// Required method
fn boot(&self) -> (State, Task<Message>);
}Expand description
The logic to initialize the State of some Application.
This trait is implemented for both Fn() -> State and
Fn() -> (State, Task<Message>).
In practice, this means that application can both take
simple functions like State::default and more advanced ones
that return a Task.
Required Methods§
Sourcefn boot(&self) -> (State, Task<Message>)
fn boot(&self) -> (State, Task<Message>)
Initializes the Application state.