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
sourceimpl 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.
Trait Implementations
sourceimpl Ord for Kind
impl Ord for Kind
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Kind> for Kind
impl PartialOrd<Kind> for Kind
sourcefn partial_cmp(&self, other: &Kind) -> Option<Ordering>
fn partial_cmp(&self, other: &Kind) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl Copy for Kind
impl Eq for Kind
impl StructuralEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more