Trait playdate::system::update::Update

source ·
pub trait Update: Sized {
    // Required method
    fn update(&mut self) -> UpdateCtrl;

    // Provided methods
    fn set_update_handler(&'static mut self) { ... }
    fn set_update_handler_with<Api>(&'static mut self, api: Api)
       where Api: Api { ... }
}
Expand description

Implementable stateful update handler with default implementation for adapter and register functions.

Required Methods§

source

fn update(&mut self) -> UpdateCtrl

Provided Methods§

source

fn set_update_handler(&'static mut self)

Register a callback function Self::update in the system, using Default api.

See also Update::set_update_handler_with and System::set_update_handler.

Equivalent to sys::ffi::playdate_sys::setUpdateCallback

source

fn set_update_handler_with<Api>(&'static mut self, api: Api)
where Api: Api,

Register a callback function Self::update in the system, using given api.

Equivalent to sys::ffi::playdate_sys::setUpdateCallback

Object Safety§

This trait is not object safe.

Implementors§