#[repr(u8)]pub enum WireType {
Varint = 0,
Int64 = 1,
Len = 2,
SGroup = 3,
EGroup = 4,
Int32 = 5,
}Expand description
Wire types used in Protocol Buffers encoding.
The wire type tells the parser how big the payload is and how to interpret it. This allows old parsers to skip over new fields they don’t understand.
Variants§
Varint = 0
Variable-width integers (Int32, Int64, UInt32, UInt64, SInt32, SInt64, Bool, Enum)
Int64 = 1
64-bit fixed-width values (Fixed64, SFixed64, Double)
Len = 2
Length-delimited values (String, Bytes, embedded messages, packed repeated fields)
SGroup = 3
Start group (deprecated feature)
EGroup = 4
End group (deprecated feature)
Int32 = 5
32-bit fixed-width values (Fixed32, SFixed32, Float)
Trait Implementations§
impl Copy for WireType
impl Eq for WireType
impl StructuralPartialEq for WireType
Auto Trait Implementations§
impl Freeze for WireType
impl RefUnwindSafe for WireType
impl Send for WireType
impl Sync for WireType
impl Unpin for WireType
impl UnwindSafe for WireType
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