pub struct InactivePluginMainThreadHandle<'a> { /* private fields */ }Expand description
A main-thread handle to the plugin, that can only exist while the plugin is in the ‘inactive’ state.
This is used by some extensions that e.g. require a function to be called on the main thread only if the plugin is inactive, and on the audio thread if it is active.
Implementations§
Source§impl<'a> InactivePluginMainThreadHandle<'a>
impl<'a> InactivePluginMainThreadHandle<'a>
Sourcepub const fn as_raw(&self) -> &'a clap_plugin
pub const fn as_raw(&self) -> &'a clap_plugin
Returns a shared reference to the raw, C-FFI compatible plugin instance struct.
This type enforces that the reference is valid for the lifetime of the instance ('a).
If you need to access the raw pointer without dereferencing it first, use
as_raw_ptr instead.
Sourcepub const fn as_raw_ptr(&self) -> *const clap_plugin
pub const fn as_raw_ptr(&self) -> *const clap_plugin
Returns a raw pointer to the raw, C-FFI compatible plugin instance struct, without dereferencing it.
If you need to safely access the plugin instance struct through a shared reference,
use as_raw instead.
Produces a PluginSharedHandle from this main-thread handle.
Turns this handle reference to a PluginSharedHandle reference.
Sourcepub const fn as_main_thread(&mut self) -> &PluginMainThreadHandle<'a>
pub const fn as_main_thread(&mut self) -> &PluginMainThreadHandle<'a>
Turns this handle reference to an exclusive PluginMainThreadHandle reference.
This may be useful if you receive a InactivePluginMainThreadHandle but need to use
some methods or extensions that do not care whether the plugin instance is currently active or not.
Only one of the InactivePluginMainThreadHandle and PluginMainThreadHandle may be
used at the same time.
Methods from Deref<Target = PluginMainThreadHandle<'a>>§
Sourcepub fn as_raw(&self) -> &'a clap_plugin
pub fn as_raw(&self) -> &'a clap_plugin
Returns a shared reference to the raw, C-FFI compatible plugin instance struct.
This type enforces that the reference is valid for the lifetime of the instance ('a).
If you need to access the raw pointer without dereferencing it first, use
as_raw_ptr instead.
Sourcepub fn as_raw_ptr(&self) -> *const clap_plugin
pub fn as_raw_ptr(&self) -> *const clap_plugin
Returns a raw pointer to the raw, C-FFI compatible plugin instance struct, without dereferencing it.
If you need to safely access the plugin instance struct through a shared reference,
use as_raw instead.
Produces a PluginSharedHandle from this main-thread handle.
Turns this handle reference to a PluginSharedHandle reference.
Methods from Deref<Target = PluginSharedHandle<'a>>§
Trait Implementations§
Source§impl<'a> Clone for InactivePluginMainThreadHandle<'a>
impl<'a> Clone for InactivePluginMainThreadHandle<'a>
Source§fn clone(&self) -> InactivePluginMainThreadHandle<'a>
fn clone(&self) -> InactivePluginMainThreadHandle<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more