pub trait PluginMainThread<'a, S: PluginShared<'a>>: Sized + 'a {
// Provided method
fn on_main_thread(&self) { ... }
}Expand description
The part of the data and operation of a plugin that must be on the main thread.
The associated lifetime 'a represents the lifetime of the plugin itself, as well as the
lifetime of the data exposed by the host.
This type requires neither Send nor Sync: it is guaranteed to stay on the main thread
at all times.
See the module documentation for more information on the thread model.
Provided Methods§
Sourcefn on_main_thread(&self)
fn on_main_thread(&self)
This is called by the host on the main thread, in response to a previous call to
HostSharedHandle::request_callback.
The default implementation of this method does nothing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".