#[repr(u32)]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<'arbitrary> Arbitrary<'arbitrary> for ImportSpecifier
impl<'arbitrary> Arbitrary<'arbitrary> for ImportSpecifier
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read moreSource§impl Archive for ImportSpecifier
impl Archive for ImportSpecifier
Source§type Resolver = ImportSpecifierResolver
type Resolver = ImportSpecifierResolver
Source§fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize
. Read moreSource§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<__D: Fallible + ?Sized> Deserialize<ImportSpecifier, __D> for Archived<ImportSpecifier>
impl<__D: Fallible + ?Sized> Deserialize<ImportSpecifier, __D> for Archived<ImportSpecifier>
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<ImportSpecifier, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<ImportSpecifier, <__D as Fallible>::Error>
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<__S> Serialize<__S> for ImportSpecifier
impl<__S> Serialize<__S> for ImportSpecifier
Source§impl Serialize for ImportSpecifier
impl Serialize for ImportSpecifier
Source§impl ShrinkToFit for ImportSpecifier
impl ShrinkToFit for ImportSpecifier
fn shrink_to_fit(&mut self)
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.