pub struct OctetStringSource { /* private fields */ }
Expand description

A decode source atop an octet string.

Trait Implementations§

source§

impl Source for OctetStringSource

§

type Error = Infallible

The error produced when the source failed to read more data.
source§

fn pos(&self) -> Pos

Returns the current logical postion within the sequence of data.
source§

fn request(&mut self, len: usize) -> Result<usize, Self::Error>

Request at least len bytes to be available. Read more
source§

fn advance(&mut self, len: usize)

Advance the source by len bytes. Read more
source§

fn slice(&self) -> &[u8]

Returns a bytes slice with the available data. Read more
source§

fn bytes(&self, start: usize, end: usize) -> Bytes

Produces a Bytes value from part of the data. Read more
source§

fn skip(&mut self, len: usize) -> Result<usize, Self::Error>

Skip over the next len bytes. Read more
source§

fn take_u8(&mut self) -> Result<u8, DecodeError<Self::Error>>

Takes a single octet from the source. Read more
source§

fn take_opt_u8(&mut self) -> Result<Option<u8>, Self::Error>

Takes an optional octet from the source. Read more
source§

fn content_err(&self, err: impl Into<ContentError>) -> DecodeError<Self::Error>

Returns a content error at the current position of the source.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoSource for T
where T: Source,

§

type Source = T

source§

fn into_source(self) -> <T as IntoSource>::Source

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.