pub enum DirectiveImportSpec {
Alias(String),
Spread,
Destructure(Vec<(String, Option<String>)>),
}Expand description
Bindspec for #import <spec> from "path".
Variants§
Alias(String)
#import name from "path" — bind module under name.
Spread
#import * from "path" — spread module’s exported bindings.
Destructure(Vec<(String, Option<String>)>)
#import { a, b as c } from "path" — bind each entry; Some(_)
is the rebinding alias.
Trait Implementations§
Source§impl Clone for DirectiveImportSpec
impl Clone for DirectiveImportSpec
Source§fn clone(&self) -> DirectiveImportSpec
fn clone(&self) -> DirectiveImportSpec
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 DirectiveImportSpec
impl Debug for DirectiveImportSpec
Source§impl PartialEq for DirectiveImportSpec
impl PartialEq for DirectiveImportSpec
Source§fn eq(&self, other: &DirectiveImportSpec) -> bool
fn eq(&self, other: &DirectiveImportSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DirectiveImportSpec
Auto Trait Implementations§
impl Freeze for DirectiveImportSpec
impl RefUnwindSafe for DirectiveImportSpec
impl Send for DirectiveImportSpec
impl Sync for DirectiveImportSpec
impl Unpin for DirectiveImportSpec
impl UnsafeUnpin for DirectiveImportSpec
impl UnwindSafe for DirectiveImportSpec
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