pub enum FieldValue<'a> {
Varint(u128),
Fixed64(u64),
LengthDelimited(&'a [u8]),
Fixed32(u32),
Invalid(u8, &'a [u8]),
Incomplete(WireType, &'a [u8]),
}
Expand description
Decoded protocol buffer value.
The wire type allows the decoder to tell how large an unknown value is. This allows the unknown value to be skipped and decoding can continue from the next value.
Variants§
Varint(u128)
Varint (wire type = 0).
Fixed64(u64)
64-bit value (wire type = 1).
LengthDelimited(&'a [u8])
Length-delimited value (wire type = 2).
Fixed32(u32)
32-bit value (wire type = 5).
Invalid(u8, &'a [u8])
Invalid value.
Invalid value is a value for which the wire type wasn’t valid. Encountering invalid wire type will result in the remaining bytes to be consumed from the current variable length stream as it is imposible to tell how large such invalid value is.
The decoding will continue after the current variable length value.
Incomplete(WireType, &'a [u8])
Value which was incomplete due to missing bytes in the payload.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for FieldValue<'a>
impl<'a> Clone for FieldValue<'a>
Source§fn clone(&self) -> FieldValue<'a>
fn clone(&self) -> FieldValue<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for FieldValue<'a>
impl<'a> Debug for FieldValue<'a>
Source§impl<'a> Hash for FieldValue<'a>
impl<'a> Hash for FieldValue<'a>
Source§impl<'a> PartialEq for FieldValue<'a>
impl<'a> PartialEq for FieldValue<'a>
impl<'a> Eq for FieldValue<'a>
impl<'a> StructuralPartialEq for FieldValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for FieldValue<'a>
impl<'a> RefUnwindSafe for FieldValue<'a>
impl<'a> Send for FieldValue<'a>
impl<'a> Sync for FieldValue<'a>
impl<'a> Unpin for FieldValue<'a>
impl<'a> UnwindSafe for FieldValue<'a>
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