pub struct NestedReader<'i, R> { /* private fields */ }
Expand description
Reader type used by Reader::read_nested
.
Trait Implementations§
Source§impl<'i, 'r, R: Reader<'r>> Reader<'r> for NestedReader<'i, R>
impl<'i, 'r, R: Reader<'r>> Reader<'r> for NestedReader<'i, R>
Source§fn peek_byte(&self) -> Option<u8>
fn peek_byte(&self) -> Option<u8>
Peek at the next byte of input without modifying the cursor.
Source§fn peek_header(&self) -> Result<Header>
fn peek_header(&self) -> Result<Header>
Source§fn read_slice(&mut self, len: Length) -> Result<&'r [u8]>
fn read_slice(&mut self, len: Length) -> Result<&'r [u8]>
Attempt to read data borrowed directly from the input as a slice,
updating the internal cursor position. Read more
Source§fn error(&mut self, kind: ErrorKind) -> Error
fn error(&mut self, kind: ErrorKind) -> Error
Return an error with the given
ErrorKind
, annotating it with
context about where the error occurred.Source§fn read_into<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>
fn read_into<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>
Attempt to read input data, writing it into the provided buffer, and
returning a slice on success. Read more
Source§fn context_specific<T>(
&mut self,
tag_number: TagNumber,
tag_mode: TagMode,
) -> Result<Option<T>>where
T: DecodeValue<'r> + FixedTag,
fn context_specific<T>(
&mut self,
tag_number: TagNumber,
tag_mode: TagMode,
) -> Result<Option<T>>where
T: DecodeValue<'r> + FixedTag,
Attempt to decode an ASN.1
CONTEXT-SPECIFIC
field with the
provided TagNumber
.Source§fn finish<T>(self, value: T) -> Result<T>
fn finish<T>(self, value: T) -> Result<T>
Finish decoding, returning the given value if there is no
remaining data, or an error otherwise
Source§fn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Have we read all of the input data?
Source§fn read_nested<'n, T, F>(&'n mut self, len: Length, f: F) -> Result<T>
fn read_nested<'n, T, F>(&'n mut self, len: Length, f: F) -> Result<T>
Read nested data of the given length.
Source§fn read_vec(&mut self, len: Length) -> Result<Vec<u8>>
fn read_vec(&mut self, len: Length) -> Result<Vec<u8>>
Available on crate feature
alloc
only.Read a byte vector of the given length.
Source§fn remaining_len(&self) -> Length
fn remaining_len(&self) -> Length
Get the number of bytes still remaining in the buffer.
Auto Trait Implementations§
impl<'i, R> Freeze for NestedReader<'i, R>
impl<'i, R> RefUnwindSafe for NestedReader<'i, R>where
R: RefUnwindSafe,
impl<'i, R> Send for NestedReader<'i, R>where
R: Send,
impl<'i, R> Sync for NestedReader<'i, R>where
R: Sync,
impl<'i, R> Unpin for NestedReader<'i, R>
impl<'i, R> !UnwindSafe for NestedReader<'i, R>
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes