[][src]Trait sauron::dom::Component

pub trait Component<MSG> where
    MSG: 'static, 
{ fn update(&mut self, msg: MSG) -> Cmd<Self, MSG>
    where
        Self: Sized + 'static
;
fn view(&self) -> Node<MSG>; fn init(&self) -> Cmd<Self, MSG>
    where
        Self: Sized + 'static
, { ... } }

The app should implement this trait for it to be handled by the Program

Required methods

fn update(&mut self, msg: MSG) -> Cmd<Self, MSG> where
    Self: Sized + 'static, 

Called each time an action is triggered from the view

fn view(&self) -> Node<MSG>

Returns a node on how the component is presented.

Loading content...

Provided methods

fn init(&self) -> Cmd<Self, MSG> where
    Self: Sized + 'static, 

Loading content...

Implementors

impl Component<()> for SimpleComponent[src]

Loading content...