pub struct ImportDecl {
pub name: Text,
pub spec: ImportSpec,
}Expand description
One import declaration: the name the importing module reaches the instance
by, and the spec its host resolver is handed.
The two written forms differ in whether the module also re-exports the
instance. import "spec" as Foo is a private frame slot; Foo = import "spec"
is the same slot plus an ordinary item Foo that forwards it. Both arrive here
as one ImportDecl — the re-exporting form has additionally pushed its
forwarding item into ModuleSyntax::items (see
docs/done/2026-08-11_elly-modules-import.md).
Fields§
§name: TextThe name the importing module’s bodies read the instance by.
spec: ImportSpecWhat the host resolver is handed.
Trait Implementations§
Source§impl Clone for ImportDecl
impl Clone for ImportDecl
Source§fn clone(&self) -> ImportDecl
fn clone(&self) -> ImportDecl
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 moreSource§impl Debug for ImportDecl
impl Debug for ImportDecl
Source§impl PartialEq for ImportDecl
impl PartialEq for ImportDecl
Source§fn eq(&self, other: &ImportDecl) -> bool
fn eq(&self, other: &ImportDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ImportDecl
impl StructuralPartialEq for ImportDecl
Auto Trait Implementations§
impl Freeze for ImportDecl
impl !RefUnwindSafe for ImportDecl
impl Send for ImportDecl
impl !Sync for ImportDecl
impl Unpin for ImportDecl
impl UnsafeUnpin for ImportDecl
impl !UnwindSafe for ImportDecl
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