pub struct Import {
pub specifier: String,
pub span: Span,
pub type_only: bool,
pub reexport: bool,
pub names: Vec<String>,
pub bindings: Vec<ImportBinding>,
}Expand description
A module this file pulls in.
Fields§
§specifier: StringThe specifier exactly as written, without quotes.
span: Span§type_only: boolA type-position import, which disappears when the code is compiled.
reexport: boolexport ... from, which forwards another module’s surface.
names: Vec<String>Local names this import binds.
Without them a consumer meeting router in app.use("/api", router)
cannot tell which module it came from, and the mount resolves to
nothing.
bindings: Vec<ImportBinding>Lossless exported-to-local binding pairs.
names remains the backward-compatible list of local names. This field
preserves the source name too, so import { original as local } can be
resolved to original without a repository-wide guess for local.
Trait Implementations§
impl Eq for Import
impl StructuralPartialEq for Import
Auto Trait Implementations§
impl Freeze for Import
impl RefUnwindSafe for Import
impl Send for Import
impl Sync for Import
impl Unpin for Import
impl UnsafeUnpin for Import
impl UnwindSafe for Import
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