Skip to main content

Decoder4

Struct Decoder4 

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

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

Implementations§

Source§

impl<A, B, C, D> Decoder4<A, B, C, D>
where A: Decoder, B: Decoder, C: Decoder, D: Decoder,

Source

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

Constructs a new composite decoder.

Trait Implementations§

Source§

impl<A, B, C, D> Clone for Decoder4<A, B, C, D>
where A: Decoder + Clone, B: Decoder + Clone, C: Decoder + Clone, D: Decoder + Clone, A::Output: Clone, B::Output: Clone, C::Output: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A, B, C, D> Debug for Decoder4<A, B, C, D>
where A: Decoder + Debug, B: Decoder + Debug, C: Decoder + Debug, D: Decoder + Debug, A::Output: Debug, B::Output: Debug, C::Output: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A, B, C, D> Decoder for Decoder4<A, B, C, D>
where A: Decoder, B: Decoder, C: Decoder, D: Decoder,

Source§

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

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

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

The error type that this decoder can produce.
Source§

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

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

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

Completes 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, D> Freeze for Decoder4<A, B, C, D>
where <A as Decoder>::Output: Freeze, <B as Decoder>::Output: Freeze, A: Freeze, B: Freeze, C: Freeze, D: Freeze, <C as Decoder>::Output: Freeze,

§

impl<A, B, C, D> RefUnwindSafe for Decoder4<A, B, C, D>

§

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

§

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

§

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

§

impl<A, B, C, D> UnsafeUnpin for Decoder4<A, B, C, D>

§

impl<A, B, C, D> UnwindSafe for Decoder4<A, B, C, D>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.