pub struct RecordMaybeUninit<const CAP: usize> { /* private fields */ }Expand description
Internal data holder, heavily unsage, do not use it directly.
Implementations§
Source§impl<const CAP: usize> RecordMaybeUninit<CAP>
impl<const CAP: usize> RecordMaybeUninit<CAP>
Sourcepub unsafe fn read<T>(&self, offset: usize) -> T
pub unsafe fn read<T>(&self, offset: usize) -> T
Reads an object of type T back from the record at offset offset.
§Safety
This function should not be called by anything but truc-generated code. It is used to put
data written by Self::write back in a droppable state.
Sourcepub unsafe fn write<T>(&mut self, offset: usize, t: T)
pub unsafe fn write<T>(&mut self, offset: usize, t: T)
Stores an object of type T in the record at offset offset.
§Safety
This function should not be called by anything but truc-generated code which is also
responsible for dropping the data by reading the object (see Self::read).
Trait Implementations§
Auto Trait Implementations§
impl<const CAP: usize> Freeze for RecordMaybeUninit<CAP>
impl<const CAP: usize> RefUnwindSafe for RecordMaybeUninit<CAP>
impl<const CAP: usize> Send for RecordMaybeUninit<CAP>
impl<const CAP: usize> Sync for RecordMaybeUninit<CAP>
impl<const CAP: usize> Unpin for RecordMaybeUninit<CAP>
impl<const CAP: usize> UnwindSafe for RecordMaybeUninit<CAP>
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