pub struct Cardinality { /* private fields */ }
Expand description
Corresponds to the grammar rule cardinality
.
Implementations§
Source§impl Cardinality
impl Cardinality
pub const fn new( ordering: Option<Ordering>, uniqueness: Option<Uniqueness>, range: CardinalityRange, ) -> Self
pub const fn new_range(min: u32, max: u32) -> Self
pub const fn new_unbounded(min: u32) -> Self
pub const fn new_single(min_and_max: u32) -> Self
pub const fn one() -> Self
pub const fn zero_or_one() -> Self
pub const fn one_or_more() -> Self
pub const fn zero_or_more() -> Self
pub const fn with_ordering(self, ordering: Option<Ordering>) -> Self
pub fn ordering(&self) -> Option<Ordering>
pub fn set_ordering(&mut self, ordering: Ordering)
pub fn unset_ordering(&mut self)
pub fn is_ordered(&self) -> Option<bool>
pub const fn with_uniqueness(self, uniqueness: Option<Uniqueness>) -> Self
pub fn uniqueness(&self) -> Option<Uniqueness>
pub fn set_uniqueness(&mut self, uniqueness: Uniqueness)
pub fn unset_uniqueness(&mut self)
pub fn is_unique(&self) -> Option<bool>
pub fn range(&self) -> &CardinalityRange
pub fn set_range(&mut self, range: CardinalityRange)
pub fn min_occurs(&self) -> u32
pub fn set_min_occurs(&mut self, min: u32)
pub fn max_occurs(&self) -> Option<u32>
pub fn set_max_occurs(&mut self, max: u32)
pub fn unset_max_occurs(&mut self)
pub fn is_default(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn is_required(&self) -> bool
pub fn is_range(&self) -> bool
pub fn is_unbounded(&self) -> bool
pub fn is_exactly(&self, value: u32) -> bool
pub fn sequence_type(&self) -> PseudoSequenceType
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 · 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§fn default() -> Cardinality
fn default() -> Cardinality
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Cardinality
impl<'de> Deserialize<'de> for Cardinality
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Cardinality
impl Display for Cardinality
Source§impl From<&CardinalityRange> for Cardinality
impl From<&CardinalityRange> for Cardinality
Source§fn from(range: &CardinalityRange) -> Self
fn from(range: &CardinalityRange) -> Self
Converts to this type from the input type.
Source§impl From<&u32> for Cardinality
impl From<&u32> for Cardinality
Source§impl From<CardinalityRange> for Cardinality
impl From<CardinalityRange> for Cardinality
Source§fn from(range: CardinalityRange) -> Self
fn from(range: CardinalityRange) -> Self
Converts to this type from the input type.
Source§impl From<u32> for Cardinality
impl From<u32> for Cardinality
Source§impl HasSourceSpan for Cardinality
impl HasSourceSpan for Cardinality
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
Source§impl PartialEq for Cardinality
impl PartialEq for Cardinality
Source§impl Serialize for Cardinality
impl Serialize for Cardinality
Source§impl Validate for Cardinality
impl Validate for Cardinality
fn validate( &self, top: &Module, cache: &impl ModuleStore, loader: &impl ModuleLoader, check_constraints: bool, )
impl Eq 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 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