Trait sauron_core::dom::Widget
source · pub trait Widget<MSG> {
// Required methods
fn update(&mut self, msg: MSG) -> Effects<MSG, ()>;
fn view(&self) -> Node<MSG>;
fn stylesheet() -> Vec<String>;
// Provided method
fn style(&self) -> Vec<String> { ... }
}
Expand description
A widget is a very simple component that can update itself view, but it can have no effect on the external component that use it.
Required Methods§
sourcefn stylesheet() -> Vec<String>
fn stylesheet() -> Vec<String>
Widget can have a style