pub struct Decoder<'a> { /* private fields */ }
Expand description
DER decoder.
Implementations
Trait Implementations
sourceimpl<'a> Reader<'a> for Decoder<'a>
impl<'a> Reader<'a> for Decoder<'a>
sourcefn peek_header(&self) -> Result<Header>
fn peek_header(&self) -> Result<Header>
sourcefn read_slice(&mut self, len: Length) -> Result<&'a [u8]>
fn read_slice(&mut self, len: Length) -> Result<&'a [u8]>
Attempt to read data borrowed directly from the input as a slice, updating the internal cursor position. Read more
sourcefn 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 Read more
sourcefn remaining_len(&self) -> Length
fn remaining_len(&self) -> Length
Get the number of bytes still remaining in the buffer.
sourcefn 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,
sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Have we read all of the input data?
sourcefn read_into<'o>(&mut self, buf: &'o mut [u8]) -> Result<&'o [u8]>
fn read_into<'o>(&mut self, buf: &'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
sourcefn read_nested<'n, T, F>(&'n mut self, len: Length, f: F) -> Result<T> where
F: FnOnce(&mut NestedReader<'n, Self>) -> Result<T>,
fn read_nested<'n, T, F>(&'n mut self, len: Length, f: F) -> Result<T> where
F: FnOnce(&mut NestedReader<'n, Self>) -> Result<T>,
Read nested data of the given length.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Decoder<'a>
impl<'a> Send for Decoder<'a>
impl<'a> Sync for Decoder<'a>
impl<'a> Unpin for Decoder<'a>
impl<'a> UnwindSafe for Decoder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more