Struct bcder::decode::CaptureSource
source · pub struct CaptureSource<'a, S: 'a> { /* private fields */ }
Expand description
A source that captures what has been advanced over.
A capture source wraps a mutable reference to some other source and provides the usual source access. However, instead of dropping octets that have been advanced over, it keeps them around and allows taking them out as a bytes value.
This type is used by Constructed::capture
.
Implementations§
source§impl<'a, S: Source> CaptureSource<'a, S>
impl<'a, S: Source> CaptureSource<'a, S>
Trait Implementations§
source§impl<'a, S: Source + 'a> Source for CaptureSource<'a, S>
impl<'a, S: Source + 'a> Source for CaptureSource<'a, S>
source§fn request(&mut self, len: usize) -> Result<usize, Self::Err>
fn request(&mut self, len: usize) -> Result<usize, Self::Err>
Request at least
len
bytes to be available. Read moresource§fn advance(&mut self, len: usize) -> Result<(), Self::Err>
fn advance(&mut self, len: usize) -> Result<(), Self::Err>
Advance the source by
len
bytes. Read moresource§fn bytes(&self, start: usize, end: usize) -> Bytes
fn bytes(&self, start: usize, end: usize) -> Bytes
Produces a
Bytes
value from part of the data. Read more