pub enum Type {
Varint = 0,
Fixed64 = 1,
Bytes = 2,
Fixed32 = 5,
None = 7,
}Expand description
The Type enum represents the different types that a field can have in a protobuf message.
The Type enum is used to determine how to encode and decode the field.
Variants§
Varint = 0
Varint may be: int32, int64, uint32, uint64, sint32, sint64, bool, enum
Fixed64 = 1
Fixed 64-bit numbers will take up exactly 64 bits of space They may be u64, i64, or f64
Bytes = 2
This includes any len-delimited tyles: string, bytes, embedded messages, packed repeated fields
Fixed32 = 5
Fixed 32-bit numbers will take up exactly 64 bits of space They may be an u32, i32, or f32
None = 7
This is a null type
Trait Implementations§
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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