Struct valkyrie_ast::NamePathNode
source · pub struct NamePathNode {
pub path: Vec<IdentifierNode>,
pub span: FileSpan,
}Expand description
package∷module∷name
Fields§
§path: Vec<IdentifierNode>The names of the identifier.
span: FileSpanImplementations§
source§impl NamePathNode
impl NamePathNode
sourcepub fn new<I>(names: I) -> Selfwhere
I: IntoIterator<Item = IdentifierNode>,
pub fn new<I>(names: I) -> Selfwhere
I: IntoIterator<Item = IdentifierNode>,
Create a new name path node with given identifiers.
sourcepub fn join<I: IntoIterator<Item = IdentifierNode>>(self, other: I) -> Self
pub fn join<I: IntoIterator<Item = IdentifierNode>>(self, other: I) -> Self
Push a new identifier to the name path.
pub fn with_span(self, span: FileSpan) -> Self
Trait Implementations§
source§impl Clone for NamePathNode
impl Clone for NamePathNode
source§fn clone(&self) -> NamePathNode
fn clone(&self) -> NamePathNode
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 NamePathNode
impl Debug for NamePathNode
source§impl Default for NamePathNode
impl Default for NamePathNode
source§fn default() -> NamePathNode
fn default() -> NamePathNode
Returns the “default value” for a type. Read more
source§impl Display for NamePathNode
impl Display for NamePathNode
source§impl From<NamePathNode> for ExpressionKind
impl From<NamePathNode> for ExpressionKind
source§fn from(o: NamePathNode) -> Self
fn from(o: NamePathNode) -> Self
Converts to this type from the input type.
source§impl FromIterator<IdentifierNode> for NamePathNode
impl FromIterator<IdentifierNode> for NamePathNode
source§fn from_iter<T: IntoIterator<Item = IdentifierNode>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = IdentifierNode>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl Hash for NamePathNode
impl Hash for NamePathNode
source§impl PartialEq for NamePathNode
impl PartialEq for NamePathNode
source§fn eq(&self, other: &NamePathNode) -> bool
fn eq(&self, other: &NamePathNode) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for NamePathNode
impl StructuralPartialEq for NamePathNode
Auto Trait Implementations§
impl RefUnwindSafe for NamePathNode
impl Send for NamePathNode
impl Sync for NamePathNode
impl Unpin for NamePathNode
impl UnwindSafe for NamePathNode
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