logo
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, Leaf, &'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

Update the component with a message. The update function returns a Cmd, which can be executed by the runtime.

Called each time an action is triggered from the view

Returns a node on how the component is presented.

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.

optionally an Application can specify its own css style

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

Implementors