Trait pixel_widgets::Model [−][src]
pub trait Model: 'static {
type Message;
fn update(&mut self, message: Self::Message) -> Vec<Command<Self::Message>>;
fn view(&mut self) -> Node<'_, Self::Message>;
}Expand description
A model that keeps track of the state of your GUI. Serves to control the behaviour and DOM of your GUI.
Styling is handled separately. Once you implemented a model, you can run your GUI using a Ui.
Examples
The examples in this repository all implement some kind of Model, check them out if you just want to read
some code.