pub struct PathExprNode {
pub is_absolute: bool,
pub steps: Vec<AstNodeId>,
pub span: SourceSpan,
pub unordered_hint: bool,
}Expand description
Path expression (sequence of steps).
Fields§
§is_absolute: boolWhether the path starts from root (/).
steps: Vec<AstNodeId>Steps in the path (IDs of PathStep nodes or filter expressions).
span: SourceSpanSource location.
unordered_hint: boolHint that result order doesn’t matter (optimization).
Implementations§
Source§impl PathExprNode
impl PathExprNode
Sourcepub fn root_only(span: SourceSpan) -> Self
pub fn root_only(span: SourceSpan) -> Self
Root-only path (/).
Sourcepub fn absolute(steps: Vec<AstNodeId>, span: SourceSpan) -> Self
pub fn absolute(steps: Vec<AstNodeId>, span: SourceSpan) -> Self
Absolute path (/a/b).
Sourcepub fn relative(steps: Vec<AstNodeId>, span: SourceSpan) -> Self
pub fn relative(steps: Vec<AstNodeId>, span: SourceSpan) -> Self
Relative path (a/b).
Trait Implementations§
Source§impl Clone for PathExprNode
impl Clone for PathExprNode
Source§fn clone(&self) -> PathExprNode
fn clone(&self) -> PathExprNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PathExprNode
impl RefUnwindSafe for PathExprNode
impl Send for PathExprNode
impl Sync for PathExprNode
impl Unpin for PathExprNode
impl UnsafeUnpin for PathExprNode
impl UnwindSafe for PathExprNode
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