Enum sdml_core::model::ConstraintBody
source · pub enum ConstraintBody {
Informal(ControlledLanguageString),
Formal(ConstraintSentence),
}
Expand description
Corresponds to the field body
in the grammar rule constraint
.
Semantics
The domain of discourse, $\mathbb{D}$, is the set of all definitions present in the current module and the set of modules transitively imported by it.
Variants§
Informal(ControlledLanguageString)
Corresponds to the grammar rule informal_constraint
.
Formal(ConstraintSentence)
Corresponds to the grammar rule formal_constraint
.
Implementations§
source§impl ConstraintBody
impl ConstraintBody
pub fn is_informal(&self) -> bool
pub fn as_informal(&self) -> Option<&ControlledLanguageString>
pub fn is_formal(&self) -> bool
pub fn as_formal(&self) -> Option<&ConstraintSentence>
Trait Implementations§
source§impl Clone for ConstraintBody
impl Clone for ConstraintBody
source§fn clone(&self) -> ConstraintBody
fn clone(&self) -> ConstraintBody
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 ConstraintBody
impl Debug for ConstraintBody
source§impl<'de> Deserialize<'de> for ConstraintBody
impl<'de> Deserialize<'de> for ConstraintBody
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<ConstraintSentence> for ConstraintBody
impl From<ConstraintSentence> for ConstraintBody
source§fn from(v: ConstraintSentence) -> Self
fn from(v: ConstraintSentence) -> Self
Converts to this type from the input type.
source§impl From<ControlledLanguageString> for ConstraintBody
impl From<ControlledLanguageString> for ConstraintBody
source§fn from(v: ControlledLanguageString) -> Self
fn from(v: ControlledLanguageString) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for ConstraintBody
impl Send for ConstraintBody
impl Sync for ConstraintBody
impl Unpin for ConstraintBody
impl UnwindSafe for ConstraintBody
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