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 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 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 for Constraint
impl HasBody for Constraint
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 BTreeSet<&'a IdentifierReference>, )
fn referenced_types<'a>(&'a self, names: &mut BTreeSet<&'a IdentifierReference>)
Source§impl Serialize for Constraint
impl Serialize for Constraint
Source§impl Validate for Constraint
impl Validate for Constraint
fn validate( &self, top: &Module, cache: &impl ModuleStore, loader: &impl ModuleLoader, check_constraints: bool, )
Auto Trait Implementations§
impl Freeze for Constraint
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