Struct marker_api::ast::AstPath
source · #[repr(C)]pub struct AstPath<'ast> { /* private fields */ }Implementations§
source§impl<'ast> AstPath<'ast>
impl<'ast> AstPath<'ast>
pub fn segments(&self) -> &[AstPathSegment<'ast>]
sourcepub fn generics(&self) -> &GenericArgs<'ast>
pub fn generics(&self) -> &GenericArgs<'ast>
This returns the GenericArgs specified on the last segment of the path.
This is especially useful, for paths pointing to types or functions. For
example, the u32 of the path Vec<u32>, is stored in the GenericArgs
as a type parameter.
Trait Implementations§
Auto Trait Implementations§
impl<'ast> RefUnwindSafe for AstPath<'ast>
impl<'ast> !Send for AstPath<'ast>
impl<'ast> !Sync for AstPath<'ast>
impl<'ast> Unpin for AstPath<'ast>
impl<'ast> UnwindSafe for AstPath<'ast>
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