Decoder3

Struct Decoder3 

Source
pub struct Decoder3<A, B, C>
where A: Decoder, B: Decoder, C: Decoder,
{ /* private fields */ }
Expand description

A decoder which decodes three objects, one after the other.

Implementations§

Source§

impl<A, B, C> Decoder3<A, B, C>
where A: Decoder, B: Decoder, C: Decoder,

Source

pub const fn new(dec_1: A, dec_2: B, dec_3: C) -> Self

Constructs a new composite decoder.

Trait Implementations§

Source§

impl<A, B, C> Decoder for Decoder3<A, B, C>
where A: Decoder, B: Decoder, C: Decoder,

Source§

type Output = (<A as Decoder>::Output, <B as Decoder>::Output, <C as Decoder>::Output)

The type that this decoder produces when decoding is complete.
Source§

type Error = Decoder3Error<<A as Decoder>::Error, <B as Decoder>::Error, <C as Decoder>::Error>

The error type that this decoder can produce.
Source§

fn push_bytes(&mut self, bytes: &mut &[u8]) -> Result<bool, Self::Error>

Push bytes into the decoder, consuming as much as possible. Read more
Source§

fn end(self) -> Result<Self::Output, Self::Error>

Complete the decoding process and return the final result. Read more
Source§

fn read_limit(&self) -> usize

Returns the maximum number of bytes this decoder can consume without over-reading. Read more

Auto Trait Implementations§

§

impl<A, B, C> Freeze for Decoder3<A, B, C>
where C: Freeze, <A as Decoder>::Output: Freeze, <B as Decoder>::Output: Freeze, A: Freeze, B: Freeze,

§

impl<A, B, C> RefUnwindSafe for Decoder3<A, B, C>

§

impl<A, B, C> Send for Decoder3<A, B, C>
where C: Send, <A as Decoder>::Output: Send, <B as Decoder>::Output: Send, A: Send, B: Send,

§

impl<A, B, C> Sync for Decoder3<A, B, C>
where C: Sync, <A as Decoder>::Output: Sync, <B as Decoder>::Output: Sync, A: Sync, B: Sync,

§

impl<A, B, C> Unpin for Decoder3<A, B, C>
where C: Unpin, <A as Decoder>::Output: Unpin, <B as Decoder>::Output: Unpin, A: Unpin, B: Unpin,

§

impl<A, B, C> UnwindSafe for Decoder3<A, B, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.