pub struct Reference {
pub location: Location,
pub def: DefRef,
pub path: PathId,
pub segment: u32,
pub name: Name,
pub via: Option<DefRef>,
}Expand description
One resolved name in a path.
§Examples
use resolve_lang::Reference;
fn first_segment(r: &Reference) -> bool { r.segment == 0 }Fields§
§location: LocationWhere the name is.
def: DefRefWhat it resolves to.
path: PathIdThe path holding it.
segment: u32The segment of the path.
name: NameThe name as written (differs from the definition’s name when reached through an aliased import).
via: Option<DefRef>The aliased import the name was reached through, if any.
Trait Implementations§
impl Copy for Reference
impl Eq for Reference
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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