devotee_backend

Trait Application

source
pub trait Application<'a, Init, Context, RenderSurface, Converter> {
    // Required methods
    fn init(&mut self, init: Init);
    fn update(&mut self, context: Context);
    fn render(&mut self, render_surface: &mut RenderSurface);
    fn converter(&self) -> Converter;

    // Provided methods
    fn pause(&mut self) { ... }
    fn resume(&mut self) { ... }
}
Expand description

Application trait.

Required Methods§

source

fn init(&mut self, init: Init)

Initialize the application.

source

fn update(&mut self, context: Context)

Handle update logic.

source

fn render(&mut self, render_surface: &mut RenderSurface)

Render on the surface passed by the Middleware.

source

fn converter(&self) -> Converter

Provide converter to convert data on the surface into u32 values.

Provided Methods§

source

fn pause(&mut self)

Register the pause event.

source

fn resume(&mut self)

Register the resume event.

Implementors§