pub enum Cardinality {
Required,
Optional,
Repeated,
}Expand description
How many of one member there are.
Three rows and no fourth: the wire roads below stand over ONE occurrence whatever supplied it, so a cardinality decides how many times a road runs and never what the road writes.
Variants§
Required
Exactly one, written where the shape declares it.
Optional
One or none, written behind a presence byte.
Repeated
As many as the value holds, written behind a framed count.
Implementations§
Trait Implementations§
Source§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
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