Skip to main content

RawPluginMetadata

Struct RawPluginMetadata 

Source
#[repr(C)]
pub struct RawPluginMetadata { pub name_ptr: *const u8, pub name_len: usize, pub version_ptr: *const u8, pub version_len: usize, pub description_ptr: *const u8, pub description_len: usize, pub abi_version: u32, }
Expand description

#[repr(C)] metadata struct returned by audio_plugin_metadata.

Each string is a (ptr, len) pair pointing into a byte buffer owned by the plugin for the lifetime of the loaded library ('static from the host’s perspective). The host copies the bytes out into owned Strings immediately (see raw_to_metadata) and never retains the pointers.

§Layout

The fields are ordered to match the C declaration plugin authors write:

struct raw_plugin_metadata {
    const uint8_t *name_ptr;        size_t name_len;
    const uint8_t *version_ptr;     size_t version_len;
    const uint8_t *description_ptr; size_t description_len;
    uint32_t abi_version;
};

Fields§

§name_ptr: *const u8

Pointer to the UTF-8 plugin name bytes.

§name_len: usize

Length in bytes of the name_ptr range.

§version_ptr: *const u8

Pointer to the UTF-8 version bytes.

§version_len: usize

Length in bytes of the version_ptr range.

§description_ptr: *const u8

Pointer to the UTF-8 description bytes.

§description_len: usize

Length in bytes of the description_ptr range.

§abi_version: u32

Encoded ABI version the plugin was built against.

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> 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, 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.