Update

Trait 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: Api>(&'static mut self, 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: Api>(&'static mut self, api: Api)

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

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

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.

Implementors§