[−][src]Struct lv2rs_atom::frame::RootFrame
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]
unsafe fn write_raw(&mut self, data: &[u8]) -> Result<&'a mut [u8], ()>
[src]
fn get_atom(&self) -> &Atom
[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]
&'b mut self,
urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, C>, ()>
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]
&'b self,
urids: &mut CachedMap
) -> Result<&'b A, GetBodyError>
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,
A: Send,
impl<'a, A: ?Sized> Sync for RootFrame<'a, A> where
A: Sync,
A: Sync,
Blanket Implementations
impl<'a, W> LiteralWritingFrame for W where
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<LiteralHeader, u8>>,
[src]
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<LiteralHeader, u8>>,
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]
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<ObjectHeader, u8>>,
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]
&'b mut self,
key: URID,
context: URID,
parameter: &A::InitializationParameter,
urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
Add a property to the object. Read more
impl<'a, W> SequenceWritingFrame for W where
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<SequenceHeader, u8>>,
[src]
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<SequenceHeader, u8>>,
fn push_event<'b, A: AtomBody + ?Sized>(
&'b mut self,
time: TimeStamp,
parameter: &A::InitializationParameter,
urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
[src]
&'b mut self,
time: TimeStamp,
parameter: &A::InitializationParameter,
urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
impl<'a, W> TupleWritingFrame for W where
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<(), u8>>,
[src]
W: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<(), u8>>,
fn push_atom<'b, A: AtomBody + ?Sized>(
&'b mut self,
parameter: &A::InitializationParameter,
urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
[src]
&'b mut self,
parameter: &A::InitializationParameter,
urids: &mut CachedMap
) -> Result<NestedFrame<'b, 'a, A>, ()>
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]
F: WritingFrame<'a> + WritingFrameExt<'a, ArrayAtomBody<VectorHeader, T>>,
T: 'static + AtomBody + Copy,
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]
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,