Trait whiskers::App

source ·
pub trait App {
    // Required method
    fn update(&mut self, sketch: &mut Sketch, ctx: &mut Context) -> Result<()>;
}
Expand description

This is the trait that your sketch app must explicitly implement. The App::update function is where the sketch draw code goes.

Required Methods§

source

fn update(&mut self, sketch: &mut Sketch, ctx: &mut Context) -> Result<()>

Draw the sketch.

This function must contain the actual draw code, using the provided Sketch and, if needed, crate::Context object.

Implementors§