[][src]Struct lv2_core::plugin::PluginInfo

pub struct PluginInfo<'a> { /* fields omitted */ }

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

Implementations

impl<'a> PluginInfo<'a>[src]

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

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.

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

Create a new plugin info instance.

pub fn plugin_uri(&self) -> &Uri[src]

The URI of the plugin that is being instantiated.

pub fn bundle_path(&self) -> &Path[src]

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.

pub fn sample_rate(&self) -> f64[src]

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

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