pub struct ImportClause<'a> {
pub spec: &'a str,
pub namespace: Option<&'a str>,
pub default_binding: Option<&'a str>,
pub named: Vec<&'a str>,
}Expand description
One static import clause of the wasm-bindgen bridge, parsed into the
bindings a self-contained bootstrap can reproduce.
A single clause carries at most one of the three binding forms: a
namespace alias (* as alias), a list of named bindings ({ a, b }),
or a default binding. The borrowed lifetimes tie every binding and the
module specifier to the bridge source line they were sliced from.
Fields§
§spec: &'a strThe module specifier, with its quotes and trailing semicolon removed.
namespace: Option<&'a str>The local binding of a * as alias namespace import.
default_binding: Option<&'a str>The local binding of a default import.
named: Vec<&'a str>The bindings of a { a, b } named import, in source order.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ImportClause<'a>
impl<'a> RefUnwindSafe for ImportClause<'a>
impl<'a> Send for ImportClause<'a>
impl<'a> Sync for ImportClause<'a>
impl<'a> Unpin for ImportClause<'a>
impl<'a> UnsafeUnpin for ImportClause<'a>
impl<'a> UnwindSafe for ImportClause<'a>
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendSync for T
impl<T> AnySync for T
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