Enum sdml_core::model::constraints::SimpleSentence
source · pub enum SimpleSentence {
Atomic(AtomicSentence),
Equation(Equation),
Inequation(Inequation),
}
Expand description
Corresponds to the grammar rule simple_sentence
.
A SimpleSentence
is either an AtomicSentence
or an Equation
.
Variants§
Atomic(AtomicSentence)
Corresponds to the choice atomic_sentence
.
Equation(Equation)
Corresponds to the choice equation
.
Inequation(Inequation)
Corresponds to the choice inequation
.
Implementations§
source§impl SimpleSentence
impl SimpleSentence
pub const fn is_atomic(&self) -> bool
pub const fn as_atomic(&self) -> Option<&AtomicSentence>
pub const fn is_equation(&self) -> bool
pub const fn as_equation(&self) -> Option<&Equation>
pub const fn is_inequation(&self) -> bool
pub const fn as_inequation(&self) -> Option<&Inequation>
Trait Implementations§
source§impl Clone for SimpleSentence
impl Clone for SimpleSentence
source§fn clone(&self) -> SimpleSentence
fn clone(&self) -> SimpleSentence
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 SimpleSentence
impl Debug for SimpleSentence
source§impl<'de> Deserialize<'de> for SimpleSentence
impl<'de> Deserialize<'de> for SimpleSentence
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<AtomicSentence> for SimpleSentence
impl From<AtomicSentence> for SimpleSentence
source§fn from(v: AtomicSentence) -> Self
fn from(v: AtomicSentence) -> Self
Converts to this type from the input type.
source§impl From<Equation> for SimpleSentence
impl From<Equation> for SimpleSentence
source§impl From<Inequation> for SimpleSentence
impl From<Inequation> for SimpleSentence
source§fn from(v: Inequation) -> Self
fn from(v: Inequation) -> 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 From<SimpleSentence> for EnvironmentDefBody
impl From<SimpleSentence> for EnvironmentDefBody
source§fn from(v: SimpleSentence) -> Self
fn from(v: SimpleSentence) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for SimpleSentence
impl Send for SimpleSentence
impl Sync for SimpleSentence
impl Unpin for SimpleSentence
impl UnwindSafe for SimpleSentence
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