Enum resast::decl::ImportSpecifier
source · [−]pub enum ImportSpecifier<'a> {
Normal(Vec<NormalImportSpec<'a>>),
Default(Ident<'a>),
Namespace(Ident<'a>),
}
Expand description
The name of the thing being imported
Variants
Normal(Vec<NormalImportSpec<'a>>)
A specifier in curly braces, this might have a local alias
import {Thing} from './stuff.js';
import {People as Persons} from './places.js';
Default(Ident<'a>)
A specifier that has been exported with the default keyword, this should not be wrapped in curly braces.
import DefaultThing from './stuff/js';
Namespace(Ident<'a>)
Import all exported members from a module in a namespace.
import * as Moment from 'moment.js';
Trait Implementations
sourceimpl<'a> Clone for ImportSpecifier<'a>
impl<'a> Clone for ImportSpecifier<'a>
sourcefn clone(&self) -> ImportSpecifier<'a>
fn clone(&self) -> ImportSpecifier<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for ImportSpecifier<'a>
impl<'a> Debug for ImportSpecifier<'a>
sourceimpl<'a> From<ImportSpecifier<'a>> for ImportSpecifier<'a>
impl<'a> From<ImportSpecifier<'a>> for ImportSpecifier<'a>
sourcefn from(other: ImportSpecifier<'a>) -> Self
fn from(other: ImportSpecifier<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> PartialEq<ImportSpecifier<'a>> for ImportSpecifier<'a>
impl<'a> PartialEq<ImportSpecifier<'a>> for ImportSpecifier<'a>
sourcefn eq(&self, other: &ImportSpecifier<'a>) -> bool
fn eq(&self, other: &ImportSpecifier<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl<'a> StructuralPartialEq for ImportSpecifier<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ImportSpecifier<'a>
impl<'a> Send for ImportSpecifier<'a>
impl<'a> Sync for ImportSpecifier<'a>
impl<'a> Unpin for ImportSpecifier<'a>
impl<'a> UnwindSafe for ImportSpecifier<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more