AsSegments

Trait AsSegments 

Source
pub trait AsSegments {
    // Required methods
    fn to_segments(self, db: &dyn SyntaxGroup) -> Vec<PathSegment>;
    fn placeholder_marker(&self, db: &dyn SyntaxGroup) -> Option<TerminalDollar>;
    fn offset(&self, db: &dyn SyntaxGroup) -> Option<TextOffset>;
}
Expand description

A trait for things that can be interpreted as a path of segments.

Required Methods§

Source

fn to_segments(self, db: &dyn SyntaxGroup) -> Vec<PathSegment>

Source

fn placeholder_marker(&self, db: &dyn SyntaxGroup) -> Option<TerminalDollar>

Returns placeholder marker $ if the path prefixed with one, indicating a resolver site modifier.

Source

fn offset(&self, db: &dyn SyntaxGroup) -> Option<TextOffset>

The offset of the path in the file.

Implementations on Foreign Types§

Source§

impl AsSegments for &ExprPath

Source§

impl AsSegments for Vec<PathSegment>

Implementors§