Enum sdml_core::model::SimpleSentence
source · pub enum SimpleSentence {
Atomic(AtomicSentence),
Equation(BinaryOperation),
}
Expand description
Corresponds to the grammar rule simple_sentence
.
A SimpleSentence
is either an AtomicSentence
or an [Equation
].
Variants§
Implementations§
source§impl SimpleSentence
impl SimpleSentence
pub fn is_atomic(&self) -> bool
pub fn as_atomic(&self) -> Option<&AtomicSentence>
pub fn is_equation(&self) -> bool
pub fn as_equation(&self) -> Option<&BinaryOperation>
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<BinaryOperation> for SimpleSentence
impl From<BinaryOperation> for SimpleSentence
source§fn from(v: BinaryOperation) -> Self
fn from(v: BinaryOperation) -> 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