LV2_Lib_Descriptor

Struct LV2_Lib_Descriptor 

Source
#[repr(C)]
pub struct LV2_Lib_Descriptor { pub handle: LV2_Lib_Handle, pub size: u32, pub cleanup: Option<unsafe extern "C" fn(handle: LV2_Lib_Handle)>, pub get_plugin: Option<unsafe extern "C" fn(handle: LV2_Lib_Handle, index: u32) -> *const LV2_Descriptor>, }
Expand description

Descriptor for a plugin library.

To access a plugin library, the host creates an LV2_Lib_Descriptor via the lv2_lib_descriptor() function in the shared object.

Fields§

§handle: LV2_Lib_Handle

Opaque library data which must be passed as the first parameter to all the methods of this struct.

§size: u32

The total size of this struct. This allows for this struct to be expanded in the future if necessary. This MUST be set by the library to sizeof(LV2_Lib_Descriptor). The host MUST NOT access any fields of this struct beyond get_plugin() unless this field indicates they are present.

§cleanup: Option<unsafe extern "C" fn(handle: LV2_Lib_Handle)>

Destroy this library descriptor and free all related resources.

§get_plugin: Option<unsafe extern "C" fn(handle: LV2_Lib_Handle, index: u32) -> *const LV2_Descriptor>

Plugin accessor.

Plugins are accessed by index using values from 0 upwards. Out of range indices MUST result in this function returning NULL, so the host can enumerate plugins by increasing index until NULL is returned.

Trait Implementations§

Source§

impl Clone for LV2_Lib_Descriptor

Source§

fn clone(&self) -> LV2_Lib_Descriptor

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LV2_Lib_Descriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for LV2_Lib_Descriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.