Struct sdml_core::model::constraints::AtomicSentence
source · pub struct AtomicSentence { /* private fields */ }
Expand description
Corresponds to the grammar rule atomic_sentence
.
An AtomicSentence
has a predicate term and an ordered list of terms corresponding
to the predicate arguments.
Implementations§
source§impl AtomicSentence
impl AtomicSentence
pub fn new<T>(predicate: T) -> Self
pub fn new_with_arguments<T, I>(predicate: T, arguments: I) -> Self
pub const fn predicate(&self) -> &Term
pub fn set_predicate(&mut self, predicate: Term)
pub fn has_arguments(&self) -> bool
pub fn arguments_len(&self) -> usize
pub fn arguments(&self) -> impl Iterator<Item = &Term>
pub fn arguments_mut(&mut self) -> impl Iterator<Item = &mut Term>
pub fn add_to_arguments<I>(&mut self, value: I)
pub fn extend_arguments<I>(&mut self, extension: I)where
I: IntoIterator<Item = Term>,
Trait Implementations§
source§impl Clone for AtomicSentence
impl Clone for AtomicSentence
source§fn clone(&self) -> AtomicSentence
fn clone(&self) -> AtomicSentence
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 AtomicSentence
impl Debug for AtomicSentence
source§impl<'de> Deserialize<'de> for AtomicSentence
impl<'de> Deserialize<'de> for AtomicSentence
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 HasSourceSpan for AtomicSentence
impl HasSourceSpan for AtomicSentence
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for AtomicSentence
impl Send for AtomicSentence
impl Sync for AtomicSentence
impl Unpin for AtomicSentence
impl UnwindSafe for AtomicSentence
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