pub struct OutputBuffer<'a> { /* private fields */ }Expand description
One exact caller-owned output allocation for a synchronous operation.
Implementations§
Source§impl<'a> OutputBuffer<'a>
impl<'a> OutputBuffer<'a>
Sourcepub fn new(
specification: &'a BufferSpec,
bytes: &'a mut [u8],
) -> Result<Self, CoreError>
pub fn new( specification: &'a BufferSpec, bytes: &'a mut [u8], ) -> Result<Self, CoreError>
Binds exact metadata to writable storage.
§Errors
Returns an error when metadata is invalid or storage has another size.
Sourcepub const fn specification(&self) -> &BufferSpec
pub const fn specification(&self) -> &BufferSpec
Returns exact validated metadata.
Sourcepub fn initialized(&self) -> &[u8] ⓘ
pub fn initialized(&self) -> &[u8] ⓘ
Returns the initialized prefix.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for OutputBuffer<'a>
impl<'a> Freeze for OutputBuffer<'a>
impl<'a> RefUnwindSafe for OutputBuffer<'a>
impl<'a> Send for OutputBuffer<'a>
impl<'a> Sync for OutputBuffer<'a>
impl<'a> Unpin for OutputBuffer<'a>
impl<'a> UnsafeUnpin for OutputBuffer<'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