Struct protobuf_codec::field::PackedFieldEncoder
[−]
[src]
pub struct PackedFieldEncoder<F, E, V: IntoIterator> { /* fields omitted */ }
Encoder for packed repeated fields.
Methods
impl<F, E, V: IntoIterator> PackedFieldEncoder<F, E, V>
[src]
Trait Implementations
impl<F: Debug, E: Debug, V: Debug + IntoIterator> Debug for PackedFieldEncoder<F, E, V> where
V::IntoIter: Debug,
[src]
V::IntoIter: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Default, E: Default, V: IntoIterator> Default for PackedFieldEncoder<F, E, V>
[src]
impl<F, E, V> Encode for PackedFieldEncoder<F, E, V> where
F: Copy + Into<FieldNum>,
E: NumericValueEncode,
V: IntoIterator<Item = E::Item>,
[src]
F: Copy + Into<FieldNum>,
E: NumericValueEncode,
V: IntoIterator<Item = E::Item>,
type Item = V
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, item: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
impl<F, E, V> SizedEncode for PackedFieldEncoder<F, E, V> where
F: Copy + Into<FieldNum>,
E: NumericValueEncode,
V: IntoIterator<Item = E::Item>,
[src]
F: Copy + Into<FieldNum>,
E: NumericValueEncode,
V: IntoIterator<Item = E::Item>,
fn exact_requiring_bytes(&self) -> u64
[src]
Returns the exact number of bytes required to encode all the items remaining in the encoder.
impl<F, E, V> FieldEncode for PackedFieldEncoder<F, E, V> where
F: Copy + Into<FieldNum>,
E: NumericValueEncode,
V: IntoIterator<Item = E::Item>,
[src]
F: Copy + Into<FieldNum>,
E: NumericValueEncode,
V: IntoIterator<Item = E::Item>,
Auto Trait Implementations
impl<F, E, V> Send for PackedFieldEncoder<F, E, V> where
E: Send,
F: Send,
<V as IntoIterator>::IntoIter: Send,
E: Send,
F: Send,
<V as IntoIterator>::IntoIter: Send,
impl<F, E, V> Sync for PackedFieldEncoder<F, E, V> where
E: Sync,
F: Sync,
<V as IntoIterator>::IntoIter: Sync,
E: Sync,
F: Sync,
<V as IntoIterator>::IntoIter: Sync,