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§
sourcefn read(&mut self) -> Result<u8, Asn1DerError>
fn read(&mut self) -> Result<u8, Asn1DerError>
Reads the next element
Provided Methods§
sourcefn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self>
fn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self>
Creates a counting source
sourcefn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U>
fn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U>
Creates a copying source