Struct sdml_core::model::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>,
pub fn with_ts_span(self, ts_span: Span) -> Self
pub fn has_ts_span(&self) -> bool
pub fn ts_span(&self) -> Option<&Span>
pub fn set_ts_span(&mut self, span: Span)
pub fn unset_ts_span(&mut self)
pub fn name(&self) -> &Identifier
pub fn set_name(&mut self, name: Identifier)
pub fn body(&self) -> &ConstraintBody
pub fn set_body(&mut self, body: 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.
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