Enum protobuf::well_known_types::type_::field::Cardinality
source · pub enum Cardinality {
CARDINALITY_UNKNOWN = 0,
CARDINALITY_OPTIONAL = 1,
CARDINALITY_REQUIRED = 2,
CARDINALITY_REPEATED = 3,
}
Expand description
Whether a field is optional, required, or repeated.
Variants§
Trait Implementations§
source§impl Clone for Cardinality
impl Clone for Cardinality
source§fn clone(&self) -> Cardinality
fn clone(&self) -> Cardinality
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Cardinality
impl Debug for Cardinality
source§impl Default for Cardinality
impl Default for Cardinality
source§impl Enum for Cardinality
impl Enum for Cardinality
source§fn from_i32(value: i32) -> Option<Cardinality>
fn from_i32(value: i32) -> Option<Cardinality>
Try to create an enum from
i32
value.
Return None
if value is unknown.source§fn from_str(str: &str) -> Option<Cardinality>
fn from_str(str: &str) -> Option<Cardinality>
Try to create an enum from
&str
value.
Return None
if str is unknown.source§const VALUES: &'static [Cardinality] = _
const VALUES: &'static [Cardinality] = _
All enum values for enum type.
source§impl EnumFull for Cardinality
impl EnumFull for Cardinality
source§fn enum_descriptor() -> EnumDescriptor
fn enum_descriptor() -> EnumDescriptor
Get enum descriptor by type.
source§fn descriptor(&self) -> EnumValueDescriptor
fn descriptor(&self) -> EnumValueDescriptor
Get enum value descriptor.
source§impl Hash for Cardinality
impl Hash for Cardinality
source§impl PartialEq for Cardinality
impl PartialEq for Cardinality
source§fn eq(&self, other: &Cardinality) -> bool
fn eq(&self, other: &Cardinality) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Cardinality
impl Eq for Cardinality
impl StructuralPartialEq for Cardinality
Auto Trait Implementations§
impl RefUnwindSafe for Cardinality
impl Send for Cardinality
impl Sync for Cardinality
impl Unpin for Cardinality
impl UnwindSafe for Cardinality
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