Struct protobuf_codec::field::PackedFieldDecoder
[−]
[src]
pub struct PackedFieldDecoder<F, D, V> where
D: NumericValueDecode,
V: Default + Extend<D::Item>, { /* fields omitted */ }
Decoder for packed repeated fields.
Actually this can decode fields regardless of whether they are packed or not.
Methods
impl<F, D, V> PackedFieldDecoder<F, D, V> where
D: NumericValueDecode,
V: Default + Extend<D::Item>,
[src]
D: NumericValueDecode,
V: Default + Extend<D::Item>,
Trait Implementations
impl<F: Debug, D: Debug, V: Debug> Debug for PackedFieldDecoder<F, D, V> where
D: NumericValueDecode,
V: Default + Extend<D::Item>,
[src]
D: NumericValueDecode,
V: Default + Extend<D::Item>,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Default, D: Default, V: Default> Default for PackedFieldDecoder<F, D, V> where
D: NumericValueDecode,
V: Default + Extend<D::Item>,
[src]
D: NumericValueDecode,
V: Default + Extend<D::Item>,
fn default() -> PackedFieldDecoder<F, D, V>
[src]
Returns the "default value" for a type. Read more
impl<F, D, V> Decode for PackedFieldDecoder<F, D, V> where
F: Copy + Into<FieldNum>,
D: NumericValueDecode,
V: Default + Extend<D::Item> + IntoIterator<Item = D::Item>,
[src]
F: Copy + Into<FieldNum>,
D: NumericValueDecode,
V: Default + Extend<D::Item> + IntoIterator<Item = D::Item>,
type Item = V
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 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
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
impl<F, D, V> FieldDecode for PackedFieldDecoder<F, D, V> where
F: Copy + Into<FieldNum>,
D: NumericValueDecode,
V: Default + Extend<D::Item> + IntoIterator<Item = D::Item>,
[src]
F: Copy + Into<FieldNum>,
D: NumericValueDecode,
V: Default + Extend<D::Item> + IntoIterator<Item = D::Item>,
Auto Trait Implementations
impl<F, D, V> Send for PackedFieldDecoder<F, D, V> where
D: Send,
F: Send,
V: Send,
D: Send,
F: Send,
V: Send,
impl<F, D, V> Sync for PackedFieldDecoder<F, D, V> where
D: Sync,
F: Sync,
V: Sync,
D: Sync,
F: Sync,
V: Sync,