Struct asn1_der::CountingSource
source · pub struct CountingSource<'a, S: Source> { /* private fields */ }
Expand description
A source that counts the amount of elements read
Warning: if a call to read
would cause ctr
to exceed usize::max_value()
, this source
will return an error and the element that has been read from the underlying source will be
lost
Trait Implementations§
source§impl<'a, S: Source> Source for CountingSource<'a, S>
impl<'a, S: Source> Source for CountingSource<'a, S>
source§fn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self>
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>
fn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U>
Creates a copying source