[][src]Struct bcder::decode::CaptureSource

pub struct CaptureSource<'a, S: 'a> { /* fields omitted */ }

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

impl<'a, S: Source> CaptureSource<'a, S>[src]

pub fn new(source: &'a mut S) -> Self[src]

Creates a new capture source using a reference to some other source.

pub fn into_bytes(self) -> Bytes[src]

Converts the capture source into the captured bytes.

pub fn skip(self)[src]

Drops the captured bytes.

Advances the underlying source to the end of the captured bytes.

Trait Implementations

impl<'a, S: Source + 'a> Source for CaptureSource<'a, S>[src]

type Err = S::Err

The error produced by the source. Read more

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for CaptureSource<'a, S> where
    S: RefUnwindSafe
[src]

impl<'a, S> Send for CaptureSource<'a, S> where
    S: Send
[src]

impl<'a, S> Sync for CaptureSource<'a, S> where
    S: Sync
[src]

impl<'a, S> Unpin for CaptureSource<'a, S>[src]

impl<'a, S> !UnwindSafe for CaptureSource<'a, S>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.