Enum prost_types::field_descriptor_proto::Type
source · #[repr(i32)]pub enum Type {
Show 18 variants
Double = 1,
Float = 2,
Int64 = 3,
Uint64 = 4,
Int32 = 5,
Fixed64 = 6,
Fixed32 = 7,
Bool = 8,
String = 9,
Group = 10,
Message = 11,
Bytes = 12,
Uint32 = 13,
Enum = 14,
Sfixed32 = 15,
Sfixed64 = 16,
Sint32 = 17,
Sint64 = 18,
}
Variants§
Double = 1
0 is reserved for errors. Order is weird for historical reasons.
Float = 2
Int64 = 3
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
Uint64 = 4
Int32 = 5
Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
Fixed64 = 6
Fixed32 = 7
Bool = 8
String = 9
Group = 10
Tag-delimited aggregate. Group type is deprecated and not supported in proto3. However, Proto3 implementations should still be able to parse the group wire format and treat group fields as unknown fields.
Message = 11
Length-delimited aggregate.
Bytes = 12
New in version 2.
Uint32 = 13
Enum = 14
Sfixed32 = 15
Sfixed64 = 16
Sint32 = 17
Uses ZigZag encoding.
Sint64 = 18
Uses ZigZag encoding.
Implementations§
source§impl Type
impl Type
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Ord for Type
impl Ord for Type
source§impl PartialOrd for Type
impl PartialOrd for Type
impl Copy for Type
impl Eq for Type
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)