Struct PluginInfo

Source
pub struct PluginInfo<'a> { /* private fields */ }
Expand description

Holds various data that is passed from the host at plugin instantiation time.

Implementations§

Source§

impl<'a> PluginInfo<'a>

Source

pub unsafe fn from_raw( plugin_descriptor: *const LV2_Descriptor, bundle_path: *const c_char, sample_rate: f64, ) -> Result<Self, PluginInfoError>

Create a new plugin info instance from raw information.

§Safety

This method is unsafe since it dereferences raw pointers. It panics when one of the pointers is null, but does not check the pointers for other validity.

Source

pub fn new(plugin_uri: &'a Uri, bundle_path: &'a Path, sample_rate: f64) -> Self

Create a new plugin info instance.

Source

pub fn plugin_uri(&self) -> &Uri

The URI of the plugin that is being instantiated.

Source

pub fn bundle_path(&self) -> &Path

The path to the LV2 bundle directory which contains this plugin binary.

This is useful to get if the plugin needs to store extra resources in its bundle directory, such as presets, or any other kind of data.

Source

pub fn sample_rate(&self) -> f64

The sample rate, in Hz, that is being used by the host. The host will always send audio data to the plugin at this sample rate.

Auto Trait Implementations§

§

impl<'a> Freeze for PluginInfo<'a>

§

impl<'a> RefUnwindSafe for PluginInfo<'a>

§

impl<'a> Send for PluginInfo<'a>

§

impl<'a> Sync for PluginInfo<'a>

§

impl<'a> Unpin for PluginInfo<'a>

§

impl<'a> UnwindSafe for PluginInfo<'a>

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.