Enum swc_css_ast::Namespace
source · pub enum Namespace {
Named(NamedNamespace),
Any(AnyNamespace),
}
Variants§
Named(NamedNamespace)
Any(AnyNamespace)
Implementations§
source§impl Namespace
impl Namespace
sourcepub fn as_named(&self) -> Option<&NamedNamespace>
pub fn as_named(&self) -> Option<&NamedNamespace>
Returns Some
if self
is a reference of variant Named
, and None
otherwise.
sourcepub fn as_mut_named(&mut self) -> Option<&mut NamedNamespace>
pub fn as_mut_named(&mut self) -> Option<&mut NamedNamespace>
Returns Some
if self
is a mutable reference of variant Named
, and None
otherwise.
sourcepub fn expect_named(self) -> NamedNamespacewhere
Self: Debug,
pub fn expect_named(self) -> NamedNamespacewhere
Self: Debug,
sourcepub fn named(self) -> Option<NamedNamespace>
pub fn named(self) -> Option<NamedNamespace>
Returns Some
if self
is of variant Named
, and None
otherwise.
sourcepub fn as_any(&self) -> Option<&AnyNamespace>
pub fn as_any(&self) -> Option<&AnyNamespace>
Returns Some
if self
is a reference of variant Any
, and None
otherwise.
sourcepub fn as_mut_any(&mut self) -> Option<&mut AnyNamespace>
pub fn as_mut_any(&mut self) -> Option<&mut AnyNamespace>
Returns Some
if self
is a mutable reference of variant Any
, and None
otherwise.
sourcepub fn expect_any(self) -> AnyNamespacewhere
Self: Debug,
pub fn expect_any(self) -> AnyNamespacewhere
Self: Debug,
sourcepub fn any(self) -> Option<AnyNamespace>
pub fn any(self) -> Option<AnyNamespace>
Returns Some
if self
is of variant Any
, and None
otherwise.
Trait Implementations§
source§impl EqIgnoreSpan for Namespace
impl EqIgnoreSpan for Namespace
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<AnyNamespace> for Namespace
impl From<AnyNamespace> for Namespace
source§fn from(v: AnyNamespace) -> Self
fn from(v: AnyNamespace) -> Self
Converts to this type from the input type.
source§impl From<NamedNamespace> for Namespace
impl From<NamedNamespace> for Namespace
source§fn from(v: NamedNamespace) -> Self
fn from(v: NamedNamespace) -> Self
Converts to this type from the input type.
impl Eq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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