Enum resast::decl::ImportSpecifier[][src]

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>>)

Tuple Fields

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>)

Tuple Fields

0: 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>)

Tuple Fields

0: Ident<'a>

Import all exported members from a module in a namespace.

import * as Moment from 'moment.js';

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.