Trait asn1_der::Source

source ·
pub trait Source: Sized {
    // Required method
    fn read(&mut self) -> Result<u8, Asn1DerError>;

    // Provided methods
    fn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self> { ... }
    fn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U> { ... }
}
Expand description

A trait defining a byte source

Required Methods§

source

fn read(&mut self) -> Result<u8, Asn1DerError>

Reads the next element

Provided Methods§

source

fn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self>

Creates a counting source

source

fn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U>

Creates a copying source

Implementations on Foreign Types§

source§

impl<'a, A: Iterator<Item = &'a u8>, B: Iterator<Item = &'a u8>> Source for Chain<A, B>

source§

fn read(&mut self) -> Result<u8, Asn1DerError>

source§

impl<S: Source> Source for &mut S

source§

fn read(&mut self) -> Result<u8, Asn1DerError>

source§

impl<'a> Source for Iter<'a, u8>

source§

fn read(&mut self) -> Result<u8, Asn1DerError>

source§

impl<'a, I: Iterator<Item = &'a u8> + 'a> Source for Skip<I>

source§

fn read(&mut self) -> Result<u8, Asn1DerError>

Implementors§

source§

impl<'a, S: Source> Source for CountingSource<'a, S>

source§

impl<S: Source, U: Sink> Source for CopyingSource<S, U>