[−][src]Struct lv2rs_atom::ports::AtomOutputPort
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]
&'a mut self,
parameter: &A::InitializationParameter,
urids: &mut CachedMap
) -> Result<RootFrame<'a, A>, WriteAtomError>
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]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,