pub trait MainThreadHandler: Sized {
// Required method
fn add_action(&self, _view: Ref<MainThreadAction>);
// Provided methods
unsafe extern "C" fn cb_add_action(
ctxt: *mut c_void,
action: *mut BNMainThreadAction,
) { ... }
fn register(self) { ... }
}Expand description
The trait required for receiving main thread actions
Required Methods§
fn add_action(&self, _view: Ref<MainThreadAction>)
Provided Methods§
unsafe extern "C" fn cb_add_action( ctxt: *mut c_void, action: *mut BNMainThreadAction, )
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.