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<'de> Deserialize<'de> for Namespace
impl<'de> Deserialize<'de> for Namespace
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>,
Deserialize this value from the given Serde deserializer. Read more
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.