Struct sdml_core::model::constraints::Constraint
source · pub struct Constraint { /* private fields */ }
Expand description
Corresponds to the grammar rule constraint
.
Implementations§
source§impl Constraint
impl Constraint
pub fn new<B>(name: Identifier, body: B) -> Selfwhere
B: Into<ConstraintBody>,
Trait Implementations§
source§impl Clone for Constraint
impl Clone for Constraint
source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
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 Constraint
impl Debug for Constraint
source§impl<'de> Deserialize<'de> for Constraint
impl<'de> Deserialize<'de> for Constraint
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 From<Constraint> for Annotation
impl From<Constraint> for Annotation
source§fn from(value: Constraint) -> Self
fn from(value: Constraint) -> Self
Converts to this type from the input type.
source§impl HasBody<ConstraintBody> for Constraint
impl HasBody<ConstraintBody> for Constraint
source§fn body(&self) -> &ConstraintBody
fn body(&self) -> &ConstraintBody
Get the body of the enclosing type.
source§fn set_body(&mut self, body: ConstraintBody)
fn set_body(&mut self, body: ConstraintBody)
Set the body of the enclosing type.
source§impl HasName for Constraint
impl HasName for Constraint
source§fn name(&self) -> &Identifier
fn name(&self) -> &Identifier
Get the name of the enclosing type.
source§fn set_name(&mut self, name: Identifier)
fn set_name(&mut self, name: Identifier)
Set the name of the enclosing type.
source§impl HasSourceSpan for Constraint
impl HasSourceSpan for Constraint
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 References for Constraint
impl References for Constraint
fn referenced_annotations<'a>( &'a self, names: &mut HashSet<&'a IdentifierReference> )
fn referenced_types<'a>(&'a self, names: &mut HashSet<&'a IdentifierReference>)
source§impl Serialize for Constraint
impl Serialize for Constraint
source§impl Validate for Constraint
impl Validate for Constraint
Auto Trait Implementations§
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnwindSafe for Constraint
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