[][src]Struct lv2rs_atom::frame::RootFrame

pub struct RootFrame<'a, A: AtomBody + ?Sized> { /* fields omitted */ }

The ground level writing frame.

This writing frame manages the first atom and actually has access to the data. It is created by the AtomOutputPort and simply acts like any WritingFrame.

Methods

impl<'a, A: AtomBody + ?Sized> RootFrame<'a, A>[src]

pub fn new(free_space: &'a mut [u8], urids: &mut CachedMap) -> Result<Self, ()>[src]

Try to create a new root frame.

All you need to create a root frame is a slice of writable memory and a way to retrieve the URID of the managed atom. Then, this function will initialize the header in the beginning of the slice and create the frame.

If the slice is not big enough to hold the atom header, this function returns an Err.

Trait Implementations

impl<'a, A: AtomBody + ?Sized> WritingFrame<'a> for RootFrame<'a, A>[src]

impl<'a, A: AtomBody + ?Sized> WritingFrameExt<'a, A> for RootFrame<'a, A>[src]

unsafe fn write_sized<T: Sized>(&mut self, object: &T) -> Result<&'a mut T, ()>[src]

Try to write a sized object into the atom space. Read more

unsafe fn create_nested_frame<'b, C: AtomBody + ?Sized>(
    &'b mut self,
    urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, C>, ()>
[src]

Create a new atom header and return a nested writing frame for it. Read more

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

Try to get a reference to the body from our atom header. Read more

Auto Trait Implementations

impl<'a, A: ?Sized> Send for RootFrame<'a, A> where
    A: Send

impl<'a, A: ?Sized> Sync for RootFrame<'a, A> where
    A: Sync

Blanket Implementations

impl<'a, W> LiteralWritingFrame for W where
    W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<LiteralHeader, u8>>, 
[src]

fn append_string(&mut self, string: &str) -> Result<(), ()>[src]

Append a string to the literal. Read more

impl<'a, W> ObjectWritingFrame for W where
    W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<ObjectHeader, u8>>, 
[src]

fn push_property<'b, A: AtomBody + ?Sized>(
    &'b mut self,
    key: URID,
    context: URID,
    parameter: &A::InitializationParameter,
    urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
[src]

Add a property to the object. Read more

impl<'a, W> SequenceWritingFrame for W where
    W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<SequenceHeader, u8>>, 
[src]

fn push_event<'b, A: AtomBody + ?Sized>(
    &'b mut self,
    time: TimeStamp,
    parameter: &A::InitializationParameter,
    urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
[src]

impl<'a, W> TupleWritingFrame for W where
    W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<(), u8>>, 
[src]

fn push_atom<'b, A: AtomBody + ?Sized>(
    &'b mut self,
    parameter: &A::InitializationParameter,
    urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
[src]

Add a new atom to the tuple. Read more

impl<'a, T, F> VectorWritingFrame for F where
    F: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<VectorHeader, T>>,
    T: 'static + AtomBody + Copy
[src]

fn push(&mut self, value: T) -> Result<(), ()>[src]

Push a value to the end of the vector.

fn append(&mut self, slice: &[T]) -> Result<(), ()>[src]

Append a slice of values to the end of the vector.

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]