pub struct TupleDecoder<D> { /* private fields */ }Expand description
Decoder for tuples.
Implementations§
Source§impl<D> TupleDecoder<D>
impl<D> TupleDecoder<D>
Sourcepub fn into_inner(self) -> D
pub fn into_inner(self) -> D
Takes ownership of this instance and returns the inner decoders.
Trait Implementations§
Source§impl<D: Debug> Debug for TupleDecoder<D>
impl<D: Debug> Debug for TupleDecoder<D>
Source§impl<D0, D1> Decode for TupleDecoder<(D0, D1)>
impl<D0, D1> Decode for TupleDecoder<(D0, D1)>
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D0, D1, D2> Decode for TupleDecoder<(D0, D1, D2)>
impl<D0, D1, D2> Decode for TupleDecoder<(D0, D1, D2)>
Source§type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item)
type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item)
The type of items to be decoded.
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D0, D1, D2, D3> Decode for TupleDecoder<(D0, D1, D2, D3)>
impl<D0, D1, D2, D3> Decode for TupleDecoder<(D0, D1, D2, D3)>
Source§type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item)
type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item)
The type of items to be decoded.
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D0, D1, D2, D3, D4> Decode for TupleDecoder<(D0, D1, D2, D3, D4)>
impl<D0, D1, D2, D3, D4> Decode for TupleDecoder<(D0, D1, D2, D3, D4)>
Source§type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item)
type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item)
The type of items to be decoded.
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D0, D1, D2, D3, D4, D5> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5)>
impl<D0, D1, D2, D3, D4, D5> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5)>
Source§type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item, <D5 as Decode>::Item)
type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item, <D5 as Decode>::Item)
The type of items to be decoded.
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D0, D1, D2, D3, D4, D5, D6> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5, D6)>
impl<D0, D1, D2, D3, D4, D5, D6> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5, D6)>
Source§type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item, <D5 as Decode>::Item, <D6 as Decode>::Item)
type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item, <D5 as Decode>::Item, <D6 as Decode>::Item)
The type of items to be decoded.
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D0, D1, D2, D3, D4, D5, D6, D7> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5, D6, D7)>
impl<D0, D1, D2, D3, D4, D5, D6, D7> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5, D6, D7)>
Source§type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item, <D5 as Decode>::Item, <D6 as Decode>::Item, <D7 as Decode>::Item)
type Item = (<D0 as Decode>::Item, <D1 as Decode>::Item, <D2 as Decode>::Item, <D3 as Decode>::Item, <D4 as Decode>::Item, <D5 as Decode>::Item, <D6 as Decode>::Item, <D7 as Decode>::Item)
The type of items to be decoded.
Source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
Source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
Source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
Source§impl<D: Default> Default for TupleDecoder<D>
impl<D: Default> Default for TupleDecoder<D>
Source§fn default() -> TupleDecoder<D>
fn default() -> TupleDecoder<D>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<D> Freeze for TupleDecoder<D>where
D: Freeze,
impl<D> RefUnwindSafe for TupleDecoder<D>where
D: RefUnwindSafe,
impl<D> Send for TupleDecoder<D>where
D: Send,
impl<D> Sync for TupleDecoder<D>where
D: Sync,
impl<D> Unpin for TupleDecoder<D>where
D: Unpin,
impl<D> UnwindSafe for TupleDecoder<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> DecodeExt for Twhere
T: Decode,
impl<T> DecodeExt for Twhere
T: Decode,
Source§fn map<T, F>(self, f: F) -> Map<Self, T, F>
fn map<T, F>(self, f: F) -> Map<Self, T, F>
Creates a decoder that converts decoded values by calling the given function. Read more
Source§fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F>
fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F>
Creates a decoder that tries to convert decoded values by calling the given function. Read more
Source§fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F>
fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F>
Creates a decoder for modifying decoding errors produced by
self. Read moreSource§fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F>
fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F>
Creates a decoder that enables conditional decoding. Read more
Source§fn collect<T>(self) -> Collect<Self, T>
fn collect<T>(self) -> Collect<Self, T>
Creates a decoder for collecting decoded items. Read more
Source§fn length(self, expected_bytes: u64) -> Length<Self>
fn length(self, expected_bytes: u64) -> Length<Self>
Creates a decoder that consumes the specified number of bytes exactly. Read more
Source§fn omit(self, do_omit: bool) -> Omittable<Self>
fn omit(self, do_omit: bool) -> Omittable<Self>
Creates a decoder that will omit decoding items if
do_omit = true is specified. Read moreSource§fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
Creates a decoder that will fail if the number of consumed bytes exceeds
bytes. Read moreSource§fn chain<T: Decode>(self, other: T) -> TupleDecoder<(Self, T)>
fn chain<T: Decode>(self, other: T) -> TupleDecoder<(Self, T)>
Takes two decoders and creates a new decoder that decodes both items in sequence. Read more
Source§fn slice(self) -> Slice<Self>
fn slice(self) -> Slice<Self>
Creates a decoder that makes it possible to slice the input byte sequence in arbitrary units. Read more
Source§fn peekable(self) -> Peekable<Self>
fn peekable(self) -> Peekable<Self>
Creates a decoder that enables to peek decoded items before calling
finish_decoding method. Read more