Trait sauron::Component [−][src]
pub trait Component<MSG> { fn update(&mut self, msg: MSG) -> Vec<MSG, Global>ⓘ; fn view(
&self
) -> Node<&'static str, &'static str, &'static str, AttributeValue<MSG>>; }
Expand description
A component has a view and can update itself. Optionally a component can return a succeeding Msg to be done on the next update iteration.
Required methods
update itself and can return an optional Msg to be called on the next update loop.