Skip to main content

StateDescriptor

Struct StateDescriptor 

Source
pub struct StateDescriptor<P: State> { /* private fields */ }
Expand description

Raw wrapper of the State extension.

This is a marker type that has the required external methods for the extension.

Implementations§

Source§

impl<P: State> StateDescriptor<P>

Source

pub unsafe extern "C" fn extern_save( instance: LV2_Handle, store: LV2_State_Store_Function, handle: LV2_State_Handle, flags: u32, features: *const *const LV2_Feature, ) -> LV2_State_Status

Handle a save request by the host.

This involves creating the plugin reference, constructing the store handle and discovering the required host features.

§Safety

This method is unsafe since it is an interface for hosts written in C and since it dereferences raw pointers.

Source

pub unsafe extern "C" fn extern_restore( instance: LV2_Handle, retrieve: LV2_State_Retrieve_Function, handle: LV2_State_Handle, flags: u32, features: *const *const LV2_Feature, ) -> LV2_State_Status

Handle a restore request by the host.

This involves creating the plugin reference, constructing the retrieve handle and discovering the required host features.

§Safety

This method is unsafe since it is an interface for hosts written in C and since it dereferences raw pointers.

Trait Implementations§

Source§

impl<P: State> ExtensionDescriptor for StateDescriptor<P>

Source§

impl<P: State> UriBound for StateDescriptor<P>

Source§

const URI: &'static [u8] = sys::LV2_STATE__interface

The URI of the type, safed as a byte slice Read more
Source§

fn uri() -> &'static CStr

Construct a CStr reference to the URI. Read more

Auto Trait Implementations§

§

impl<P> Freeze for StateDescriptor<P>

§

impl<P> RefUnwindSafe for StateDescriptor<P>
where P: RefUnwindSafe,

§

impl<P> Send for StateDescriptor<P>

§

impl<P> Sync for StateDescriptor<P>

§

impl<P> Unpin for StateDescriptor<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for StateDescriptor<P>

§

impl<P> UnwindSafe for StateDescriptor<P>
where P: UnwindSafe,

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.