pub struct ManagedBufferNestedDecodeInput<M, MB>{
pub managed_buffer: MB,
pub decode_index: usize,
pub buffer_len: usize,
/* private fields */
}Expand description
Nested decode buffer based on a managed buffer. Uses the load/copy slice API to extract pieces of the managed buffer for deserialization.
Fields§
§managed_buffer: MB§decode_index: usize§buffer_len: usizeImplementations§
source§impl<M: ManagedTypeApi, MB: Borrow<ManagedBuffer<M>>> ManagedBufferNestedDecodeInput<M, MB>
impl<M: ManagedTypeApi, MB: Borrow<ManagedBuffer<M>>> ManagedBufferNestedDecodeInput<M, MB>
Trait Implementations§
source§impl<M: ManagedTypeApi, MB: Borrow<ManagedBuffer<M>>> NestedDecodeInput for ManagedBufferNestedDecodeInput<M, MB>
impl<M: ManagedTypeApi, MB: Borrow<ManagedBuffer<M>>> NestedDecodeInput for ManagedBufferNestedDecodeInput<M, MB>
source§fn remaining_len(&self) -> usize
fn remaining_len(&self) -> usize
The remaining length of the input data.
source§fn read_into(&mut self, into: &mut [u8]) -> Result<(), DecodeError>
fn read_into(&mut self, into: &mut [u8]) -> Result<(), DecodeError>
Read the exact number of bytes required to fill the given buffer.
source§fn read_into_or_exit<ExitCtx: Clone>(
&mut self,
into: &mut [u8],
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
)
fn read_into_or_exit<ExitCtx: Clone>( &mut self, into: &mut [u8], c: ExitCtx, exit: fn(_: ExitCtx, _: DecodeError) -> ! )
Read the exact number of bytes required to fill the given buffer.
Exit early if there are not enough bytes to fill the result.
fn read_specialized<T, C, F>( &mut self, context: C, else_deser: F ) -> Result<T, DecodeError>
fn read_specialized_or_exit<T, C, ExitCtx, F>( &mut self, context: C, c: ExitCtx, exit: fn(_: ExitCtx, _: DecodeError) -> !, else_deser: F ) -> T
source§fn is_depleted(&self) -> bool
fn is_depleted(&self) -> bool
True if all data from the buffer has already been used.
source§fn read_byte_or_exit<ExitCtx>(
&mut self,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> u8where
ExitCtx: Clone,
fn read_byte_or_exit<ExitCtx>(
&mut self,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> u8where
ExitCtx: Clone,
Read a single byte from the input.
Auto Trait Implementations§
impl<M, MB> RefUnwindSafe for ManagedBufferNestedDecodeInput<M, MB>where
M: RefUnwindSafe,
MB: RefUnwindSafe,
impl<M, MB> Send for ManagedBufferNestedDecodeInput<M, MB>
impl<M, MB> Sync for ManagedBufferNestedDecodeInput<M, MB>
impl<M, MB> Unpin for ManagedBufferNestedDecodeInput<M, MB>
impl<M, MB> UnwindSafe for ManagedBufferNestedDecodeInput<M, MB>where
M: UnwindSafe,
MB: UnwindSafe,
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