Struct sdml_core::model::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 with_ts_span(self, ts_span: Span) -> Self
pub fn has_ts_span(&self) -> bool
pub fn ts_span(&self) -> Option<&Span>
pub fn set_ts_span(&mut self, span: Span)
pub fn unset_ts_span(&mut self)
pub 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(&mut self, value: Term)
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.
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