pub struct Path {
pub segments: Vec<PathSegment>,
pub span: Span,
}Expand description
A qualified path like java.util.List or just List.
Fields§
§segments: Vec<PathSegment>§span: SpanImplementations§
Source§impl Path
impl Path
Sourcepub fn from_ident(ident: Ident) -> Self
pub fn from_ident(ident: Ident) -> Self
Create a path from a single identifier.
Sourcepub fn is_ident(&self) -> bool
pub fn is_ident(&self) -> bool
Check if this path is a simple identifier (single segment, no type args).
Sourcepub fn last_ident(&self) -> &Ident
pub fn last_ident(&self) -> &Ident
Get the last identifier in the path.
Sourcepub fn last_segment(&self) -> &PathSegment
pub fn last_segment(&self) -> &PathSegment
Get the last segment of the path.
Trait Implementations§
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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