pub enum ConstraintBody {
Informal(ControlledLanguageString),
Formal(FormalConstraint),
}
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(FormalConstraint)
Corresponds to the grammar rule formal_constraint
.
Implementations§
Source§impl ConstraintBody
impl ConstraintBody
pub const fn is_informal(&self) -> bool
pub const fn as_informal(&self) -> Option<&ControlledLanguageString>
pub const fn is_formal(&self) -> bool
pub const fn as_formal(&self) -> Option<&FormalConstraint>
Trait Implementations§
Source§impl Clone for ConstraintBody
impl Clone for ConstraintBody
Source§fn clone(&self) -> ConstraintBody
fn clone(&self) -> ConstraintBody
Returns a duplicate 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<&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.
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 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.
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 References for ConstraintBody
impl References for ConstraintBody
fn referenced_annotations<'a>( &'a self, names: &mut BTreeSet<&'a IdentifierReference>, )
fn referenced_types<'a>(&'a self, names: &mut BTreeSet<&'a IdentifierReference>)
Source§impl Serialize for ConstraintBody
impl Serialize for ConstraintBody
Source§impl Validate for ConstraintBody
impl Validate for ConstraintBody
fn validate( &self, top: &Module, cache: &impl ModuleStore, loader: &impl ModuleLoader, check_constraints: bool, )
Auto Trait Implementations§
impl Freeze for ConstraintBody
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