pub trait Sketch: Sized {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn model(app: &App) -> Self;
fn update(&mut self, app: &App, update: Update);
fn view(&self, app: &App, frame: Frame<'_>);
}Expand description
Trait for nannou sketches that can be discovered and run.
Implementing this trait allows sketches to be registered and managed
by the Sketchbook.
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
A brief description of what this sketch visualizes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.