pub enum ImportSpecifier {
Named(ImportNamedSpecifier),
Default(ImportDefaultSpecifier),
Namespace(ImportStarAsSpecifier),
}Variants§
Implementations§
source§impl ImportSpecifier
impl ImportSpecifier
sourcepub fn as_named(&self) -> Option<&ImportNamedSpecifier>
pub fn as_named(&self) -> Option<&ImportNamedSpecifier>
Returns Some if self is a reference of variant Named, and None otherwise.
sourcepub fn as_mut_named(&mut self) -> Option<&mut ImportNamedSpecifier>
pub fn as_mut_named(&mut self) -> Option<&mut ImportNamedSpecifier>
Returns Some if self is a mutable reference of variant Named, and None otherwise.
sourcepub fn expect_named(self) -> ImportNamedSpecifierwhere
Self: Debug,
pub fn expect_named(self) -> ImportNamedSpecifierwhere
Self: Debug,
sourcepub fn named(self) -> Option<ImportNamedSpecifier>
pub fn named(self) -> Option<ImportNamedSpecifier>
Returns Some if self is of variant Named, and None otherwise.
sourcepub const fn is_default(&self) -> bool
pub const fn is_default(&self) -> bool
Returns true if self is of variant Default.
sourcepub fn as_default(&self) -> Option<&ImportDefaultSpecifier>
pub fn as_default(&self) -> Option<&ImportDefaultSpecifier>
Returns Some if self is a reference of variant Default, and None otherwise.
sourcepub fn as_mut_default(&mut self) -> Option<&mut ImportDefaultSpecifier>
pub fn as_mut_default(&mut self) -> Option<&mut ImportDefaultSpecifier>
Returns Some if self is a mutable reference of variant Default, and None otherwise.
sourcepub fn expect_default(self) -> ImportDefaultSpecifierwhere
Self: Debug,
pub fn expect_default(self) -> ImportDefaultSpecifierwhere
Self: Debug,
sourcepub fn default(self) -> Option<ImportDefaultSpecifier>
pub fn default(self) -> Option<ImportDefaultSpecifier>
Returns Some if self is of variant Default, and None otherwise.
sourcepub const fn is_namespace(&self) -> bool
pub const fn is_namespace(&self) -> bool
Returns true if self is of variant Namespace.
sourcepub fn as_namespace(&self) -> Option<&ImportStarAsSpecifier>
pub fn as_namespace(&self) -> Option<&ImportStarAsSpecifier>
Returns Some if self is a reference of variant Namespace, and None otherwise.
sourcepub fn as_mut_namespace(&mut self) -> Option<&mut ImportStarAsSpecifier>
pub fn as_mut_namespace(&mut self) -> Option<&mut ImportStarAsSpecifier>
Returns Some if self is a mutable reference of variant Namespace, and None otherwise.
sourcepub fn expect_namespace(self) -> ImportStarAsSpecifierwhere
Self: Debug,
pub fn expect_namespace(self) -> ImportStarAsSpecifierwhere
Self: Debug,
sourcepub fn namespace(self) -> Option<ImportStarAsSpecifier>
pub fn namespace(self) -> Option<ImportStarAsSpecifier>
Returns Some if self is of variant Namespace, and None otherwise.
Trait Implementations§
source§impl Clone for ImportSpecifier
impl Clone for ImportSpecifier
source§fn clone(&self) -> ImportSpecifier
fn clone(&self) -> ImportSpecifier
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ImportSpecifier
impl Debug for ImportSpecifier
source§impl<'de> Deserialize<'de> for ImportSpecifier
impl<'de> Deserialize<'de> for ImportSpecifier
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EqIgnoreSpan for ImportSpecifier
impl EqIgnoreSpan for ImportSpecifier
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<ImportDefaultSpecifier> for ImportSpecifier
impl From<ImportDefaultSpecifier> for ImportSpecifier
source§fn from(v: ImportDefaultSpecifier) -> Self
fn from(v: ImportDefaultSpecifier) -> Self
source§impl From<ImportNamedSpecifier> for ImportSpecifier
impl From<ImportNamedSpecifier> for ImportSpecifier
source§fn from(v: ImportNamedSpecifier) -> Self
fn from(v: ImportNamedSpecifier) -> Self
source§impl From<ImportStarAsSpecifier> for ImportSpecifier
impl From<ImportStarAsSpecifier> for ImportSpecifier
source§fn from(v: ImportStarAsSpecifier) -> Self
fn from(v: ImportStarAsSpecifier) -> Self
source§impl Hash for ImportSpecifier
impl Hash for ImportSpecifier
source§impl PartialEq for ImportSpecifier
impl PartialEq for ImportSpecifier
source§impl Serialize for ImportSpecifier
impl Serialize for ImportSpecifier
source§impl Spanned for ImportSpecifier
impl Spanned for ImportSpecifier
impl Eq for ImportSpecifier
impl StructuralPartialEq for ImportSpecifier
Auto Trait Implementations§
impl Freeze for ImportSpecifier
impl RefUnwindSafe for ImportSpecifier
impl Send for ImportSpecifier
impl Sync for ImportSpecifier
impl Unpin for ImportSpecifier
impl UnwindSafe for ImportSpecifier
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more