Enum swc_css_ast::SupportsInParens
source · pub enum SupportsInParens {
SupportsCondition(SupportsCondition),
Feature(SupportsFeature),
GeneralEnclosed(GeneralEnclosed),
}
Variants§
Implementations§
source§impl SupportsInParens
impl SupportsInParens
sourcepub fn is_supports_condition(&self) -> bool
pub fn is_supports_condition(&self) -> bool
Returns true
if self
is of variant SupportsCondition
.
sourcepub fn as_supports_condition(&self) -> Option<&SupportsCondition>
pub fn as_supports_condition(&self) -> Option<&SupportsCondition>
Returns Some
if self
is a reference of variant SupportsCondition
, and None
otherwise.
sourcepub fn as_mut_supports_condition(&mut self) -> Option<&mut SupportsCondition>
pub fn as_mut_supports_condition(&mut self) -> Option<&mut SupportsCondition>
Returns Some
if self
is a mutable reference of variant SupportsCondition
, and None
otherwise.
sourcepub fn expect_supports_condition(self) -> SupportsConditionwhere
Self: Debug,
pub fn expect_supports_condition(self) -> SupportsConditionwhere
Self: Debug,
Unwraps the value, yielding the content of SupportsCondition
.
Panics
Panics if the value is not SupportsCondition
, with a panic message including the content of self
.
sourcepub fn supports_condition(self) -> Option<SupportsCondition>
pub fn supports_condition(self) -> Option<SupportsCondition>
Returns Some
if self
is of variant SupportsCondition
, and None
otherwise.
sourcepub fn is_feature(&self) -> bool
pub fn is_feature(&self) -> bool
Returns true
if self
is of variant Feature
.
sourcepub fn as_feature(&self) -> Option<&SupportsFeature>
pub fn as_feature(&self) -> Option<&SupportsFeature>
Returns Some
if self
is a reference of variant Feature
, and None
otherwise.
sourcepub fn as_mut_feature(&mut self) -> Option<&mut SupportsFeature>
pub fn as_mut_feature(&mut self) -> Option<&mut SupportsFeature>
Returns Some
if self
is a mutable reference of variant Feature
, and None
otherwise.
sourcepub fn expect_feature(self) -> SupportsFeaturewhere
Self: Debug,
pub fn expect_feature(self) -> SupportsFeaturewhere
Self: Debug,
sourcepub fn feature(self) -> Option<SupportsFeature>
pub fn feature(self) -> Option<SupportsFeature>
Returns Some
if self
is of variant Feature
, and None
otherwise.
sourcepub fn is_general_enclosed(&self) -> bool
pub fn is_general_enclosed(&self) -> bool
Returns true
if self
is of variant GeneralEnclosed
.
sourcepub fn as_general_enclosed(&self) -> Option<&GeneralEnclosed>
pub fn as_general_enclosed(&self) -> Option<&GeneralEnclosed>
Returns Some
if self
is a reference of variant GeneralEnclosed
, and None
otherwise.
sourcepub fn as_mut_general_enclosed(&mut self) -> Option<&mut GeneralEnclosed>
pub fn as_mut_general_enclosed(&mut self) -> Option<&mut GeneralEnclosed>
Returns Some
if self
is a mutable reference of variant GeneralEnclosed
, and None
otherwise.
sourcepub fn expect_general_enclosed(self) -> GeneralEnclosedwhere
Self: Debug,
pub fn expect_general_enclosed(self) -> GeneralEnclosedwhere
Self: Debug,
Unwraps the value, yielding the content of GeneralEnclosed
.
Panics
Panics if the value is not GeneralEnclosed
, with a panic message including the content of self
.
sourcepub fn general_enclosed(self) -> Option<GeneralEnclosed>
pub fn general_enclosed(self) -> Option<GeneralEnclosed>
Returns Some
if self
is of variant GeneralEnclosed
, and None
otherwise.
Trait Implementations§
source§impl Clone for SupportsInParens
impl Clone for SupportsInParens
source§fn clone(&self) -> SupportsInParens
fn clone(&self) -> SupportsInParens
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SupportsInParens
impl Debug for SupportsInParens
source§impl<'de> Deserialize<'de> for SupportsInParens
impl<'de> Deserialize<'de> for SupportsInParens
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 SupportsInParens
impl EqIgnoreSpan for SupportsInParens
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<GeneralEnclosed> for SupportsInParens
impl From<GeneralEnclosed> for SupportsInParens
source§fn from(v: GeneralEnclosed) -> Self
fn from(v: GeneralEnclosed) -> Self
source§impl From<SupportsCondition> for SupportsInParens
impl From<SupportsCondition> for SupportsInParens
source§fn from(v: SupportsCondition) -> Self
fn from(v: SupportsCondition) -> Self
source§impl From<SupportsFeature> for SupportsInParens
impl From<SupportsFeature> for SupportsInParens
source§fn from(v: SupportsFeature) -> Self
fn from(v: SupportsFeature) -> Self
source§impl From<SupportsInParens> for SupportsConditionType
impl From<SupportsInParens> for SupportsConditionType
source§fn from(v: SupportsInParens) -> Self
fn from(v: SupportsInParens) -> Self
source§impl Hash for SupportsInParens
impl Hash for SupportsInParens
source§impl PartialEq<SupportsInParens> for SupportsInParens
impl PartialEq<SupportsInParens> for SupportsInParens
source§fn eq(&self, other: &SupportsInParens) -> bool
fn eq(&self, other: &SupportsInParens) -> bool
self
and other
values to be equal, and is used
by ==
.