[][src]Struct lv2rs_atom::ports::AtomOutputPort

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

Wrapper for atom writing operations.

Methods

impl<A: AtomBody + ?Sized> AtomOutputPort<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: *mut 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 write_atom_body<'a>(
    &'a mut self,
    parameter: &A::InitializationParameter,
    urids: &mut CachedMap
) -> Result<RootFrame<'a, A>, WriteAtomError>
[src]

Write an atom to the internal atom pointer.

This method will create a RootFrame and initialize the body. For scalar atoms, this is all you can and need to do. For all other atoms, you can write additional data using the RootFrame.

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

impl<A> !Sync for AtomOutputPort<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]