pub struct NamePath { /* private fields */ }
Expand description
Corresponds to the grammar rule name_path
.
Semantics
The keywords self
and Self
may ONLY appear as the first element.
The name path $x.y.z$ is equivalent to $z(y(x))$, or $(z \circ y)(x)$.
For example:
self.name.length
becomes length(name(self))
Implementations§
source§impl NamePath
impl NamePath
pub fn new<S, P>(subject: S, path: P) -> Selfwhere S: Into<Subject>, P: Into<Vec<Identifier>>,
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 subject(&self) -> &Subject
pub fn set_subject(&mut self, subject: Subject)
pub fn has_path(&self) -> bool
pub fn path_len(&self) -> usize
pub fn path(&self) -> impl Iterator<Item = &Identifier>
pub fn path_mut(&mut self) -> impl Iterator<Item = &mut Identifier>
pub fn add_to_path(&mut self, value: Identifier)
pub fn extend_path<I>(&mut self, extension: I)where I: IntoIterator<Item = Identifier>,
Trait Implementations§
source§impl<'de> Deserialize<'de> for NamePath
impl<'de> Deserialize<'de> for NamePath
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
Auto Trait Implementations§
impl RefUnwindSafe for NamePath
impl Send for NamePath
impl Sync for NamePath
impl Unpin for NamePath
impl UnwindSafe for NamePath
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