Struct sdml_core::model::constraints::FormalConstraint
source · pub struct FormalConstraint { /* private fields */ }
Implementations§
source§impl FormalConstraint
impl FormalConstraint
pub fn new<V>(body: V) -> Selfwhere
V: Into<ConstraintSentence>,
pub fn with_definition<I>(self, definition: EnvironmentDef) -> Self
pub fn with_environment(self, environment: Vec<EnvironmentDef>) -> Self
pub fn has_definitions(&self) -> bool
pub fn definitions_len(&self) -> usize
pub fn definitions(&self) -> impl Iterator<Item = &EnvironmentDef>
pub fn definitions_mut(&mut self) -> impl Iterator<Item = &mut EnvironmentDef>
pub fn add_to_definitions<I>(&mut self, value: I)where
I: Into<EnvironmentDef>,
pub fn extend_definitions<I>(&mut self, extension: I)where
I: IntoIterator<Item = EnvironmentDef>,
Trait Implementations§
source§impl Clone for FormalConstraint
impl Clone for FormalConstraint
source§fn clone(&self) -> FormalConstraint
fn clone(&self) -> FormalConstraint
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 FormalConstraint
impl Debug for FormalConstraint
source§impl<'de> Deserialize<'de> for FormalConstraint
impl<'de> Deserialize<'de> for FormalConstraint
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<FormalConstraint> for ConstraintBody
impl From<FormalConstraint> for ConstraintBody
source§fn from(v: FormalConstraint) -> Self
fn from(v: FormalConstraint) -> Self
Converts to this type from the input type.
source§impl HasBody<ConstraintSentence> for FormalConstraint
impl HasBody<ConstraintSentence> for FormalConstraint
source§fn body(&self) -> &ConstraintSentence
fn body(&self) -> &ConstraintSentence
Get the body of the enclosing type.
source§fn set_body(&mut self, body: ConstraintSentence)
fn set_body(&mut self, body: ConstraintSentence)
Set the body of the enclosing type.
source§impl HasSourceSpan for FormalConstraint
impl HasSourceSpan for FormalConstraint
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 FormalConstraint
impl References for FormalConstraint
fn referenced_types<'a>(&'a self, names: &mut HashSet<&'a IdentifierReference>)
fn referenced_annotations<'a>( &'a self, names: &mut HashSet<&'a IdentifierReference> )
source§impl Serialize for FormalConstraint
impl Serialize for FormalConstraint
source§impl Validate for FormalConstraint
impl Validate for FormalConstraint
Auto Trait Implementations§
impl RefUnwindSafe for FormalConstraint
impl Send for FormalConstraint
impl Sync for FormalConstraint
impl Unpin for FormalConstraint
impl UnwindSafe for FormalConstraint
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