Enum prost_types::field::Kind
source · #[repr(i32)]
pub enum Kind {
Show 19 variants
TypeUnknown,
TypeDouble,
TypeFloat,
TypeInt64,
TypeUint64,
TypeInt32,
TypeFixed64,
TypeFixed32,
TypeBool,
TypeString,
TypeGroup,
TypeMessage,
TypeBytes,
TypeUint32,
TypeEnum,
TypeSfixed32,
TypeSfixed64,
TypeSint32,
TypeSint64,
}
Expand description
Basic field types.
Variants§
TypeUnknown
Field type unknown.
TypeDouble
Field type double.
TypeFloat
Field type float.
TypeInt64
Field type int64.
TypeUint64
Field type uint64.
TypeInt32
Field type int32.
TypeFixed64
Field type fixed64.
TypeFixed32
Field type fixed32.
TypeBool
Field type bool.
TypeString
Field type string.
TypeGroup
Field type group. Proto2 syntax only, and deprecated.
TypeMessage
Field type message.
TypeBytes
Field type bytes.
TypeUint32
Field type uint32.
TypeEnum
Field type enum.
TypeSfixed32
Field type sfixed32.
TypeSfixed64
Field type sfixed64.
TypeSint32
Field type sint32.
TypeSint64
Field type sint64.
Implementations§
source§impl Kind
impl Kind
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 Kind
impl Ord for Kind
source§impl PartialEq<Kind> for Kind
impl PartialEq<Kind> for Kind
source§impl PartialOrd<Kind> for Kind
impl PartialOrd<Kind> for Kind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more