pub enum Cardinality {
One,
ZeroOrOne,
ZeroOrMore,
OneOrMore,
}Expand description
Cardinality constraint on a field — how many values may / must be supplied.
Maps directly to DSP-API’s owl:cardinality / owl:minCardinality /
owl:maxCardinality triple (Decision 1 — only 0/1 bounds are emitted).
Derives Copy (fieldless). Display produces the CONTEXT.md canonical
notation (1, 0-1, 0-n, 1-n), matching dsp-tools’ native data-model
format. No serde derive.
Variants§
One
Exactly one value required (owl:cardinality 1). Display: "1".
ZeroOrOne
At most one value, may be absent (owl:maxCardinality 1). Display: "0-1".
ZeroOrMore
Any number of values, may be absent (owl:minCardinality 0). Display: "0-n".
OneOrMore
At least one value required (owl:minCardinality 1). Display: "1-n".
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
Source§impl Display for Cardinality
impl Display for Cardinality
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.