Skip to main content

ImportPathHop

Type Alias ImportPathHop 

Source
pub type ImportPathHop = ImportPathHop;
Expand description

Aliased Type§

pub struct ImportPathHop {
    pub from: String,
    pub to: String,
    pub type_only: bool,
    pub import_line: Option<u32>,
}

Fields§

§from: String

The importing module, root-relative.

§to: String

The imported module, root-relative.

§type_only: bool

Whether every symbol on this edge is type-only, so the hop is erased at build time. Type-only hops are reported, never skipped: an import type chain is a real compile-time coupling.

§import_line: Option<u32>

1-based line in from of the imported binding that creates this edge: the first value-carrying symbol on the import, or the first symbol when every symbol is type-only. On a multi-line import that is the binding’s own line, not the import keyword’s. Absent when the edge carries no span or the source could not be read.