Struct PluginMainThreadHandle Copy item path Source pub struct PluginMainThreadHandle<'a> { }Expand description A main-thread handle to the plugin instance.
This can be used to make requests to the plugin that can only be made in the main thread, which
is required for e.g. some extensions.
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.
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.
Returns the PluginDescriptor this instance corresponds to.
This may return None if the underlying plugin implementation didn’t properly populate
the descriptor pointer.
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.
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.
Retrieves the plugin’s pointer to the given extension type E.
This returns None if the plugin does not support the given extension.
§ Example
use clack_extensions::params::{PluginParams};
use clack_host::plugin::PluginSharedHandle;
let info: PluginSharedHandle = if let Some (params) = info.get_extension::<PluginParams>() {
} else {
}Safely dereferences a RawExtension pointer produced by this plugin instance.
See the documentation of the RawExtension type for more information about how this works
internally.
§ Panics
This method will panic if the given extension pointer does not match the plugin instance of
this handle.
Formats the value using the given formatter.
Read more The resulting type after dereferencing.
Dereferences the value.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
🔬 This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.