#[repr(i32)]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§
CARDINALITY_UNKNOWN = 0
For fields with unknown cardinality.
CARDINALITY_OPTIONAL = 1
For optional fields.
CARDINALITY_REQUIRED = 2
For required fields. Proto2 syntax only.
CARDINALITY_REPEATED = 3
For repeated fields.
Implementations§
Source§impl Cardinality
impl Cardinality
Sourcepub const Unknown: Self = Self::CARDINALITY_UNKNOWN
pub const Unknown: Self = Self::CARDINALITY_UNKNOWN
Idiomatic alias for Self::CARDINALITY_UNKNOWN; Debug prints the variant name.
Sourcepub const Optional: Self = Self::CARDINALITY_OPTIONAL
pub const Optional: Self = Self::CARDINALITY_OPTIONAL
Idiomatic alias for Self::CARDINALITY_OPTIONAL; Debug prints the variant name.
Sourcepub const Required: Self = Self::CARDINALITY_REQUIRED
pub const Required: Self = Self::CARDINALITY_REQUIRED
Idiomatic alias for Self::CARDINALITY_REQUIRED; Debug prints the variant name.
Sourcepub const Repeated: Self = Self::CARDINALITY_REPEATED
pub const Repeated: Self = Self::CARDINALITY_REPEATED
Idiomatic alias for Self::CARDINALITY_REPEATED; Debug prints the variant name.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for Cardinality
Available on crate feature arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for Cardinality
Available on crate feature
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for Cardinality
impl Clone for Cardinality
Source§fn clone(&self) -> Cardinality
fn clone(&self) -> Cardinality
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Cardinality
Source§impl Debug for Cardinality
impl Debug for Cardinality
Source§impl Default for Cardinality
impl Default for Cardinality
Source§impl Enumeration for Cardinality
impl Enumeration for Cardinality
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
The name of this enum variant as it appears in the
.proto file.impl Eq for Cardinality
Source§impl Hash for Cardinality
impl Hash for Cardinality
Source§impl PartialEq for Cardinality
impl PartialEq for Cardinality
impl StructuralPartialEq for Cardinality
Auto Trait Implementations§
impl Freeze for Cardinality
impl RefUnwindSafe for Cardinality
impl Send for Cardinality
impl Sync for Cardinality
impl Unpin for Cardinality
impl UnsafeUnpin 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