[][src]Struct lv2_sys::LV2_Lib_Descriptor

#[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>,
}

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

impl Clone for LV2_Lib_Descriptor[src]

impl Copy for LV2_Lib_Descriptor[src]

impl Debug for LV2_Lib_Descriptor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.