Struct protobuf_codec::field::FieldDecoder
[−]
[src]
pub struct FieldDecoder<F, D: ValueDecode> { /* fields omitted */ }
Decoder for required scalar fields.
Methods
impl<F, D: ValueDecode> FieldDecoder<F, D>
[src]
Trait Implementations
impl<F: Debug, D: Debug + ValueDecode> Debug for FieldDecoder<F, D>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Default, D: Default + ValueDecode> Default for FieldDecoder<F, D>
[src]
fn default() -> FieldDecoder<F, D>
[src]
Returns the "default value" for a type. Read more
impl<F, D> Decode for FieldDecoder<F, D> where
F: Copy + Into<FieldNum>,
D: ValueDecode,
[src]
F: Copy + Into<FieldNum>,
D: ValueDecode,
type Item = D::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 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> FieldDecode for FieldDecoder<F, D> where
F: Copy + Into<FieldNum>,
D: ValueDecode,
[src]
F: Copy + Into<FieldNum>,
D: ValueDecode,
fn start_decoding(&mut self, tag: Tag) -> Result<bool>
[src]
Tries to start decoding a field. Read more
impl<F, D> RequiredFieldDecode for FieldDecoder<F, D> where
F: Copy + Into<FieldNum>,
D: ValueDecode,
[src]
F: Copy + Into<FieldNum>,
D: ValueDecode,
fn is_present(&self) -> bool
[src]
Returns true
if this field has been present in the target input stream, otherwise false
. Read more
Auto Trait Implementations
impl<F, D> Send for FieldDecoder<F, D> where
D: Send,
F: Send,
D: Send,
F: Send,
impl<F, D> Sync for FieldDecoder<F, D> where
D: Sync,
F: Sync,
D: Sync,
F: Sync,