Struct bytecodec::tuple::TupleDecoder
[−]
[src]
pub struct TupleDecoder<D> { /* fields omitted */ }
Decoder for tuples.
Methods
impl<D> TupleDecoder<D>
[src]
pub fn new(inner: D) -> Self
[src]
Makes a new TupleDecoder
.
ⓘImportant traits for &'a mut Wpub fn inner_ref(&self) -> &D
[src]
Returns a reference to the inner decoders.
ⓘImportant traits for &'a mut Wpub fn inner_mut(&mut self) -> &mut D
[src]
Returns a mutable reference to the inner decoders.
pub fn into_inner(self) -> D
[src]
Takes ownership of this instance and returns the inner decoders.
Trait Implementations
impl<D: Debug> Debug for TupleDecoder<D>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<D: Default> Default for TupleDecoder<D>
[src]
fn default() -> TupleDecoder<D>
[src]
Returns the "default value" for a type. Read more
impl<D0, D1> Decode for TupleDecoder<(D0, D1)> where
D0: Decode,
D1: Decode,
[src]
D0: Decode,
D1: Decode,
type Item = (D0::Item, D1::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
impl<D0, D1, D2> Decode for TupleDecoder<(D0, D1, D2)> where
D0: Decode,
D1: Decode,
D2: Decode,
[src]
D0: Decode,
D1: Decode,
D2: Decode,
type Item = (D0::Item, D1::Item, D2::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
impl<D0, D1, D2, D3> Decode for TupleDecoder<(D0, D1, D2, D3)> where
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
[src]
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
type Item = (D0::Item, D1::Item, D2::Item, D3::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
impl<D0, D1, D2, D3, D4> Decode for TupleDecoder<(D0, D1, D2, D3, D4)> where
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
[src]
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
type Item = (D0::Item, D1::Item, D2::Item, D3::Item, D4::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
impl<D0, D1, D2, D3, D4, D5> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5)> where
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
D5: Decode,
[src]
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
D5: Decode,
type Item = (D0::Item, D1::Item, D2::Item, D3::Item, D4::Item, D5::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
impl<D0, D1, D2, D3, D4, D5, D6> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5, D6)> where
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
D5: Decode,
D6: Decode,
[src]
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
D5: Decode,
D6: Decode,
type Item = (D0::Item, D1::Item, D2::Item, D3::Item, D4::Item, D5::Item, D6::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
impl<D0, D1, D2, D3, D4, D5, D6, D7> Decode for TupleDecoder<(D0, D1, D2, D3, D4, D5, D6, D7)> where
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
D5: Decode,
D6: Decode,
D7: Decode,
[src]
D0: Decode,
D1: Decode,
D2: Decode,
D3: Decode,
D4: Decode,
D5: Decode,
D6: Decode,
D7: Decode,
type Item = (D0::Item, D1::Item, D2::Item, D3::Item, D4::Item, D5::Item, D6::Item, D7::Item)
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
Auto Trait Implementations
impl<D> Send for TupleDecoder<D> where
D: Send,
D: Send,
impl<D> Sync for TupleDecoder<D> where
D: Sync,
D: Sync,