pub struct ManagedBufferNestedDecodeInput<M>where
M: ManagedTypeApi,{ /* 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.
Implementations§
source§impl<M> ManagedBufferNestedDecodeInput<M>where
M: ManagedTypeApi,
impl<M> ManagedBufferNestedDecodeInput<M>where M: ManagedTypeApi,
pub fn new(managed_buffer: ManagedBuffer<M>) -> Self
Trait Implementations§
source§impl<M> NestedDecodeInput for ManagedBufferNestedDecodeInput<M>where
M: ManagedTypeApi,
impl<M> NestedDecodeInput for ManagedBufferNestedDecodeInput<M>where M: ManagedTypeApi,
source§fn remaining_len(&self) -> usize
fn remaining_len(&self) -> usize
The remaining length of the input data.
source§fn peek_into<H>(&mut self, into: &mut [u8], h: H) -> Result<(), H::HandledErr>where
H: DecodeErrorHandler,
fn peek_into<H>(&mut self, into: &mut [u8], h: H) -> Result<(), H::HandledErr>where H: DecodeErrorHandler,
Read the exact number of bytes required to fill the given buffer, without consuming the underlying bytes. Read more
source§fn read_into<H>(&mut self, into: &mut [u8], h: H) -> Result<(), H::HandledErr>where
H: DecodeErrorHandler,
fn read_into<H>(&mut self, into: &mut [u8], h: H) -> Result<(), H::HandledErr>where H: DecodeErrorHandler,
Read & consume the exact number of bytes required to fill the given buffer. Read more
fn supports_specialized_type<T: TryStaticCast>() -> bool
fn read_specialized<T, C, H>( &mut self, context: C, h: H ) -> Result<T, H::HandledErr>where T: TryStaticCast, C: TryStaticCast, H: DecodeErrorHandler,
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<H>(
&mut self,
h: H
) -> Result<u8, <H as DecodeErrorHandler>::HandledErr>where
H: DecodeErrorHandler,
fn read_byte<H>( &mut self, h: H ) -> Result<u8, <H as DecodeErrorHandler>::HandledErr>where H: DecodeErrorHandler,
Read a single byte from the input.
Auto Trait Implementations§
impl<M> CodecFromSelf for ManagedBufferNestedDecodeInput<M>where M: CodecFromSelf,
impl<M> RefUnwindSafe for ManagedBufferNestedDecodeInput<M>where M: RefUnwindSafe, <M as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
impl<M> Send for ManagedBufferNestedDecodeInput<M>where M: Send, <M as HandleTypeInfo>::ManagedBufferHandle: Send,
impl<M> Sync for ManagedBufferNestedDecodeInput<M>where M: Sync, <M as HandleTypeInfo>::ManagedBufferHandle: Sync,
impl<M> Unpin for ManagedBufferNestedDecodeInput<M>where M: Unpin, <M as HandleTypeInfo>::ManagedBufferHandle: Unpin,
impl<M> UnwindSafe for ManagedBufferNestedDecodeInput<M>where M: UnwindSafe, <M as HandleTypeInfo>::ManagedBufferHandle: 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