pub struct InputBuffer<'a> { /* private fields */ }Expand description
One validated read-only buffer borrowed for a synchronous operation.
Implementations§
Source§impl<'a> InputBuffer<'a>
impl<'a> InputBuffer<'a>
Sourcepub fn new(
specification: &'a BufferSpec,
bytes: &'a [u8],
) -> Result<Self, CoreError>
pub fn new( specification: &'a BufferSpec, bytes: &'a [u8], ) -> Result<Self, CoreError>
Binds exact metadata to readable bytes.
Content hashing and seal verification remain the caller’s responsibility; this constructor verifies the exact accessible length.
§Errors
Returns an error when metadata is invalid or the length differs.
Sourcepub const fn specification(&self) -> &BufferSpec
pub const fn specification(&self) -> &BufferSpec
Returns exact validated metadata.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for InputBuffer<'a>
impl<'a> RefUnwindSafe for InputBuffer<'a>
impl<'a> Send for InputBuffer<'a>
impl<'a> Sync for InputBuffer<'a>
impl<'a> Unpin for InputBuffer<'a>
impl<'a> UnsafeUnpin for InputBuffer<'a>
impl<'a> UnwindSafe for InputBuffer<'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