[][src]Struct lv2rs_atom::ports::AtomInputPort

pub struct AtomInputPort<A: AtomBody + ?Sized> { /* fields omitted */ }

Wrapper for atom reading operations.

Methods

impl<A: AtomBody + ?Sized> AtomInputPort<A>[src]

pub fn new() -> Self[src]

Create a new port.

Please note that the newly created port wil point to null and therefore, write_atom_body will yield undefined behaviour.

pub fn connect_port(&mut self, atom: *const Atom)[src]

Set the internal atom pointer.

As implied by the name, this method should be called by an atom's connect_port. However, you have to cast the passed pointer to the correct type!

pub unsafe fn get_atom_body(
    &self,
    urids: &mut CachedMap
) -> Result<&A, GetAtomError>
[src]

Dereference the internal raw pointer to an atom body reference.

This method is unsafe since it dereferences the raw, internal pointer and therefore could yield undefined behaviour. Make sure that your plugin's connect_port method calls this port's connect_port method correctly!

Auto Trait Implementations

impl<A> !Send for AtomInputPort<A>

impl<A> !Sync for AtomInputPort<A>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]