pub struct RootFrame<'a, A: AtomBody + ?Sized> { /* private fields */ }Expand description
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.
Implementations§
Source§impl<'a, A: AtomBody + ?Sized> RootFrame<'a, A>
impl<'a, A: AtomBody + ?Sized> RootFrame<'a, A>
Sourcepub fn new(free_space: &'a mut [u8], urids: &mut CachedMap) -> Result<Self, ()>
pub fn new(free_space: &'a mut [u8], urids: &mut CachedMap) -> Result<Self, ()>
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§
Source§impl<'a, A: AtomBody + ?Sized> WritingFrameExt<'a, A> for RootFrame<'a, A>
impl<'a, A: AtomBody + ?Sized> WritingFrameExt<'a, A> for RootFrame<'a, A>
Source§unsafe fn write_sized<T: Sized>(&mut self, object: &T) -> Result<&'a mut T, ()>
unsafe fn write_sized<T: Sized>(&mut self, object: &T) -> Result<&'a mut T, ()>
Try to write a sized object into the atom space. Read more
Source§unsafe fn create_nested_frame<'b, C: AtomBody + ?Sized>(
&'b mut self,
urids: &mut CachedMap,
) -> Result<NestedFrame<'b, 'a, C>, ()>
unsafe fn create_nested_frame<'b, C: AtomBody + ?Sized>( &'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
Source§unsafe fn get_atom_body<'b>(
&'b self,
urids: &mut CachedMap,
) -> Result<&'b A, GetBodyError>
unsafe fn get_atom_body<'b>( &'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> Freeze for RootFrame<'a, A>where
A: ?Sized,
impl<'a, A> RefUnwindSafe for RootFrame<'a, A>where
A: RefUnwindSafe + ?Sized,
impl<'a, A> Send for RootFrame<'a, A>
impl<'a, A> Sync for RootFrame<'a, A>
impl<'a, A> Unpin for RootFrame<'a, A>
impl<'a, A> !UnwindSafe for RootFrame<'a, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<'a, W> LiteralWritingFrame<'a> for W
impl<'a, W> LiteralWritingFrame<'a> for W
Source§impl<'a, W> ObjectWritingFrame<'a> for W
impl<'a, W> ObjectWritingFrame<'a> for W
Source§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>, ()>
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>, ()>
Add a property to the object. Read more