[][src]Struct lv2_state::StatePropertyReader

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

Reading handle for properties.

This handle contains the type and the data of a property retrieved from the RetrieveHandle.

Methods

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

pub fn new(type_: URID, body: Space<'a>) -> Self[src]

Create a new reading handle with the given type and data.

pub fn type_(&self) -> URID[src]

Return the type of the property.

pub fn body(&self) -> Space[src]

Return the data of the property.

pub fn read<A: Atom<'a, 'a>>(
    &self,
    urid: URID<A>,
    parameter: A::ReadParameter
) -> Result<A::ReadHandle, StateErr>
[src]

Try to interpret the property as an atom.

This works like any atom reader: You pass the URID of the atom type as well as the type-specific argument, and if the desired type is the actual type of the data, a read handle is returned.

If the desired and actual data types don't match, Err(StateErr::BadType) is returned.

Auto Trait Implementations

impl<'a> RefUnwindSafe for StatePropertyReader<'a>

impl<'a> Send for StatePropertyReader<'a>

impl<'a> Sync for StatePropertyReader<'a>

impl<'a> Unpin for StatePropertyReader<'a>

impl<'a> UnwindSafe for StatePropertyReader<'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.