Struct sdml_core::model::constraints::FunctionCardinality
source · pub struct FunctionCardinality { /* private fields */ }
Expand description
Corresponds to the grammar rule cardinality
.
Implementations§
source§impl FunctionCardinality
impl FunctionCardinality
pub const fn new( ordering: Option<Ordering>, uniqueness: Option<Uniqueness>, range: Option<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 new_wildcard() -> 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: Ordering) -> Self
pub const fn has_ordering(&self) -> bool
pub const 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: Uniqueness) -> Self
pub const fn has_uniqueness(&self) -> bool
pub const 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 const fn has_range(&self) -> bool
pub const fn range(&self) -> Option<&CardinalityRange>
pub fn set_range(&mut self, range: CardinalityRange)
pub fn unset_range(&mut self)
pub fn is_wildcard(&self) -> bool
Trait Implementations§
source§impl Clone for FunctionCardinality
impl Clone for FunctionCardinality
source§fn clone(&self) -> FunctionCardinality
fn clone(&self) -> FunctionCardinality
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 FunctionCardinality
impl Debug for FunctionCardinality
source§impl Default for FunctionCardinality
impl Default for FunctionCardinality
source§fn default() -> FunctionCardinality
fn default() -> FunctionCardinality
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for FunctionCardinality
impl<'de> Deserialize<'de> for FunctionCardinality
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 FunctionCardinality
impl Display for FunctionCardinality
source§impl HasSourceSpan for FunctionCardinality
impl HasSourceSpan for FunctionCardinality
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 FunctionCardinality
impl PartialEq for FunctionCardinality
source§fn eq(&self, other: &FunctionCardinality) -> bool
fn eq(&self, other: &FunctionCardinality) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for FunctionCardinality
impl Serialize for FunctionCardinality
source§impl Validate for FunctionCardinality
impl Validate for FunctionCardinality
fn is_complete(&self, top: &Module, cache: &ModuleCache) -> Result<bool, Error>
fn is_valid( &self, check_constraints: bool, top: &Module, cache: &ModuleCache ) -> Result<bool, Error>
fn validate( &self, check_constraints: bool, top: &Module, cache: &ModuleCache, errors: &mut Vec<Error> ) -> Result<(), Error>
impl Eq for FunctionCardinality
impl StructuralPartialEq for FunctionCardinality
Auto Trait Implementations§
impl RefUnwindSafe for FunctionCardinality
impl Send for FunctionCardinality
impl Sync for FunctionCardinality
impl Unpin for FunctionCardinality
impl UnwindSafe for FunctionCardinality
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