Enum swc_css_ast::Namespace
source · [−]pub enum Namespace {
Named(NamedNamespace),
Any(AnyNamespace),
}
Variants
Named(NamedNamespace)
Any(AnyNamespace)
Implementations
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for Namespace
impl<'de> Deserialize<'de> for Namespace
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EqIgnoreSpan for Namespace
impl EqIgnoreSpan for Namespace
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<AnyNamespace> for Namespace
impl From<AnyNamespace> for Namespace
sourcefn from(v: AnyNamespace) -> Self
fn from(v: AnyNamespace) -> Self
Converts to this type from the input type.
sourceimpl From<NamedNamespace> for Namespace
impl From<NamedNamespace> for Namespace
sourcefn from(v: NamedNamespace) -> Self
fn from(v: NamedNamespace) -> Self
Converts to this type from the input type.
impl Eq for Namespace
impl StructuralEq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
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