pub trait Renderer<Props> {
// Required method
fn render(&mut self, props: Props);
}Expand description
Renderer abstraction for rendering Props.
Implement this trait to integrate oxide-mvu just your rendering system (UI framework, terminal, embedded display, etc.).
The render method is called whenever the model changes, receiving
fresh Props derived from the current state via MvuLogic::view.
§Example
use oxide_mvu::Renderer;
struct Props {
message: &'static str,
}
struct ConsoleRenderer;
impl Renderer<Props> for ConsoleRenderer {
fn render(&mut self, props: Props) {
println!("{}", props.message);
}
}