pub struct SpaceElement { /* private fields */ }
Expand description
Linked list element for dynamic atom writing.
This struct works in conjunction with SpaceHead
to provide a way to write atoms to dynamically allocated memory.
Implementations§
Source§impl SpaceElement
impl SpaceElement
Sourcepub fn allocate(&mut self, size: usize) -> Option<(&mut Self, &mut [u8])>
pub fn allocate(&mut self, size: usize) -> Option<(&mut Self, &mut [u8])>
Append an element to the list.
If this is the last element of the list, allocate a slice of the required length and append a new element to the list. If not, do nothing and return None
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpaceElement
impl RefUnwindSafe for SpaceElement
impl Send for SpaceElement
impl Sync for SpaceElement
impl Unpin for SpaceElement
impl UnwindSafe for SpaceElement
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