Enum sdml_core::model::constraints::ConstraintSentence
source · pub enum ConstraintSentence {
Simple(SimpleSentence),
Boolean(BooleanSentence),
Quantified(QuantifiedSentence),
}
Expand description
Corresponds to the grammar rule constraint_sentence
.
A ConstraintSentence
is either a SimpleSentence
, a BooleanSentence
, or
a [QuantitySentence
].
Variants§
Implementations§
source§impl ConstraintSentence
impl ConstraintSentence
pub const fn is_simple(&self) -> bool
pub const fn as_simple(&self) -> Option<&SimpleSentence>
pub const fn is_boolean(&self) -> bool
pub const fn as_boolean(&self) -> Option<&BooleanSentence>
pub const fn is_quantified(&self) -> bool
pub const fn as_quantified(&self) -> Option<&QuantifiedSentence>
Trait Implementations§
source§impl Clone for ConstraintSentence
impl Clone for ConstraintSentence
source§fn clone(&self) -> ConstraintSentence
fn clone(&self) -> ConstraintSentence
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 ConstraintSentence
impl Debug for ConstraintSentence
source§impl<'de> Deserialize<'de> for ConstraintSentence
impl<'de> Deserialize<'de> for ConstraintSentence
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<BooleanSentence> for ConstraintSentence
impl From<BooleanSentence> for ConstraintSentence
source§fn from(v: BooleanSentence) -> Self
fn from(v: BooleanSentence) -> Self
Converts to this type from the input type.
source§impl From<ConstraintSentence> for EnvironmentDefBody
impl From<ConstraintSentence> for EnvironmentDefBody
source§fn from(v: ConstraintSentence) -> Self
fn from(v: ConstraintSentence) -> Self
Converts to this type from the input type.
source§impl From<QuantifiedSentence> for ConstraintSentence
impl From<QuantifiedSentence> for ConstraintSentence
source§fn from(v: QuantifiedSentence) -> Self
fn from(v: QuantifiedSentence) -> Self
Converts to this type from the input type.
source§impl From<SimpleSentence> for ConstraintSentence
impl From<SimpleSentence> for ConstraintSentence
source§fn from(v: SimpleSentence) -> Self
fn from(v: SimpleSentence) -> Self
Converts to this type from the input type.
source§impl HasBody<ConstraintSentence> for FormalConstraint
impl HasBody<ConstraintSentence> for FormalConstraint
fn body(&self) -> &ConstraintSentence
fn set_body(&mut self, body: ConstraintSentence)
source§impl HasBody<ConstraintSentence> for FunctionDef
impl HasBody<ConstraintSentence> for FunctionDef
fn body(&self) -> &ConstraintSentence
fn set_body(&mut self, body: ConstraintSentence)
source§impl HasBody<ConstraintSentence> for QuantifiedSentence
impl HasBody<ConstraintSentence> for QuantifiedSentence
fn body(&self) -> &ConstraintSentence
fn set_body(&mut self, body: ConstraintSentence)
Auto Trait Implementations§
impl RefUnwindSafe for ConstraintSentence
impl Send for ConstraintSentence
impl Sync for ConstraintSentence
impl Unpin for ConstraintSentence
impl UnwindSafe for ConstraintSentence
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