pub trait Application<MSG> where
    MSG: 'static, 
{ fn update(&mut self, _msg: MSG) -> Cmd<Self, MSG>
    where
        Self: Sized + 'static
; fn view(&self) -> Node<MSG>; fn init(&mut self) -> Cmd<Self, MSG>
    where
        Self: Sized + 'static
, { ... } fn style(&self) -> String { ... } fn measurements(&self, measurements: Measurements) -> Cmd<Self, MSG>
    where
        Self: Sized + 'static
, { ... } fn observed_attributes() -> Vec<&'static str> { ... } fn attributes_changed(
        &mut self,
        _attributes_values: BTreeMap<String, String>
    ) { ... } fn attributes_for_mount(&self) -> BTreeMap<String, String> { ... } }
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

returns the attributes that is observed by this component

This will be invoked when a component is used as a custom element and the attributes of the custom-element has been modified

This will be invoked when a component needs to set the attributes for the mounted element of this component

Implementors