pub struct ModuleRefSite {
pub pos: SourcePosition,
pub ori: Arc<Origin>,
pub name: ModPath,
pub canonical: ModPath,
pub def_ori: Option<Arc<Origin>>,
}Expand description
A textual occurrence of a module reference (either use foo; or
mod foo;). For the mod foo; case def_ori points at the file
the module’s body was loaded from — that’s the natural target for
go-to-definition on a module name.
Fields§
§pos: SourcePosition§ori: Arc<Origin>§name: ModPathModule name as the user wrote it (might be relative).
canonical: ModPathAbsolute module path the compiler resolved this reference to.
def_ori: Option<Arc<Origin>>Origin of the module’s body (the file it was loaded from)
when this site is itself a declaration that pulled the
module in. None for plain use sites.
Trait Implementations§
Source§impl Clone for ModuleRefSite
impl Clone for ModuleRefSite
Source§fn clone(&self) -> ModuleRefSite
fn clone(&self) -> ModuleRefSite
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 ModuleRefSite
impl RefUnwindSafe for ModuleRefSite
impl Send for ModuleRefSite
impl Sync for ModuleRefSite
impl Unpin for ModuleRefSite
impl UnsafeUnpin for ModuleRefSite
impl UnwindSafe for ModuleRefSite
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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