Enum ressa::node::ImportSpecifier
source · pub enum ImportSpecifier {
Normal(Identifier, Option<Identifier>),
Default(Identifier),
Namespace(Identifier),
}
Expand description
The name of the thing being imported
Variants
Normal(Identifier, Option<Identifier>)
A specifier in curly braces, this might have a local alias
import {Thing} from './stuff.js';
import {People as Persons} from './places.js';
Default(Identifier)
A specifier that has been exported with the default keyword, this should not be wrapped in curly braces.
import DefaultThing from './stuff/js';
Namespace(Identifier)
Import all exported members from a module in a namespace.
import * as Moment from 'moment.js';
Implementations
sourceimpl ImportSpecifier
impl ImportSpecifier
pub fn normal(ident: Identifier, local: Option<Identifier>) -> Self
pub fn normal_no_local(ident: &str) -> Self
pub fn normal_local(ident: &str, local: &str) -> Self
pub fn default(ident: &str) -> Self
pub fn namespace(ident: &str) -> Self
Trait Implementations
sourceimpl Clone for ImportSpecifier
impl Clone for ImportSpecifier
sourcefn clone(&self) -> ImportSpecifier
fn clone(&self) -> ImportSpecifier
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 moresourceimpl Debug for ImportSpecifier
impl Debug for ImportSpecifier
sourceimpl PartialEq<ImportSpecifier> for ImportSpecifier
impl PartialEq<ImportSpecifier> for ImportSpecifier
sourcefn eq(&self, other: &ImportSpecifier) -> bool
fn eq(&self, other: &ImportSpecifier) -> bool
impl StructuralPartialEq for ImportSpecifier
Auto Trait Implementations
impl RefUnwindSafe for ImportSpecifier
impl Send for ImportSpecifier
impl Sync for ImportSpecifier
impl Unpin for ImportSpecifier
impl UnwindSafe for ImportSpecifier
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