Trait sauron::prelude::Application [−][src]
pub trait Application<MSG> where
MSG: 'static, {
fn update(&mut self, _msg: MSG) -> Cmd<Program<Self, MSG>>
where
Self: 'static;
fn view(
&self
) -> Node<&'static str, &'static str, &'static str, AttributeValue<MSG>>;
fn init(&mut self) -> Cmd<Program<Self, MSG>>
where
Self: 'static,
{ ... }
fn style(&self) -> String { ... }
fn measurements(
&self,
measurements: Measurements
) -> Cmd<Program<Self, MSG>>
where
Self: 'static,
{ ... }
}
Expand description
An Application is the root component of your program. Everything that happens in your application is done here.
Required methods
Called each time an action is triggered from the view
Provided methods
The application can implement this method where it can modify its initial state. This method is called right after the program is mounted into the DOM.
fn measurements(&self, measurements: Measurements) -> Cmd<Program<Self, MSG>> where
Self: 'static,
fn measurements(&self, measurements: Measurements) -> Cmd<Program<Self, MSG>> where
Self: 'static,
This is called after dispatching and updating the dom for the component This is for diagnostic and performance measurement purposes.
Warning: DO NOT use for anything else other than the intended purpose