Enum swc_css_ast::SizeFeature
source · pub enum SizeFeature {
Plain(SizeFeaturePlain),
Boolean(SizeFeatureBoolean),
Range(SizeFeatureRange),
RangeInterval(SizeFeatureRangeInterval),
}
Variants§
Plain(SizeFeaturePlain)
Boolean(SizeFeatureBoolean)
Range(SizeFeatureRange)
RangeInterval(SizeFeatureRangeInterval)
Implementations§
source§impl SizeFeature
impl SizeFeature
sourcepub fn as_plain(&self) -> Option<&SizeFeaturePlain>
pub fn as_plain(&self) -> Option<&SizeFeaturePlain>
Returns Some
if self
is a reference of variant Plain
, and None
otherwise.
sourcepub fn as_mut_plain(&mut self) -> Option<&mut SizeFeaturePlain>
pub fn as_mut_plain(&mut self) -> Option<&mut SizeFeaturePlain>
Returns Some
if self
is a mutable reference of variant Plain
, and None
otherwise.
sourcepub fn expect_plain(self) -> SizeFeaturePlainwhere
Self: Debug,
pub fn expect_plain(self) -> SizeFeaturePlainwhere Self: Debug,
sourcepub fn plain(self) -> Option<SizeFeaturePlain>
pub fn plain(self) -> Option<SizeFeaturePlain>
Returns Some
if self
is of variant Plain
, and None
otherwise.
sourcepub const fn is_boolean(&self) -> bool
pub const fn is_boolean(&self) -> bool
Returns true
if self
is of variant Boolean
.
sourcepub fn as_boolean(&self) -> Option<&SizeFeatureBoolean>
pub fn as_boolean(&self) -> Option<&SizeFeatureBoolean>
Returns Some
if self
is a reference of variant Boolean
, and None
otherwise.
sourcepub fn as_mut_boolean(&mut self) -> Option<&mut SizeFeatureBoolean>
pub fn as_mut_boolean(&mut self) -> Option<&mut SizeFeatureBoolean>
Returns Some
if self
is a mutable reference of variant Boolean
, and None
otherwise.
sourcepub fn expect_boolean(self) -> SizeFeatureBooleanwhere
Self: Debug,
pub fn expect_boolean(self) -> SizeFeatureBooleanwhere Self: Debug,
sourcepub fn boolean(self) -> Option<SizeFeatureBoolean>
pub fn boolean(self) -> Option<SizeFeatureBoolean>
Returns Some
if self
is of variant Boolean
, and None
otherwise.
sourcepub fn as_range(&self) -> Option<&SizeFeatureRange>
pub fn as_range(&self) -> Option<&SizeFeatureRange>
Returns Some
if self
is a reference of variant Range
, and None
otherwise.
sourcepub fn as_mut_range(&mut self) -> Option<&mut SizeFeatureRange>
pub fn as_mut_range(&mut self) -> Option<&mut SizeFeatureRange>
Returns Some
if self
is a mutable reference of variant Range
, and None
otherwise.
sourcepub fn expect_range(self) -> SizeFeatureRangewhere
Self: Debug,
pub fn expect_range(self) -> SizeFeatureRangewhere Self: Debug,
sourcepub fn range(self) -> Option<SizeFeatureRange>
pub fn range(self) -> Option<SizeFeatureRange>
Returns Some
if self
is of variant Range
, and None
otherwise.
sourcepub const fn is_range_interval(&self) -> bool
pub const fn is_range_interval(&self) -> bool
Returns true
if self
is of variant RangeInterval
.
sourcepub fn as_range_interval(&self) -> Option<&SizeFeatureRangeInterval>
pub fn as_range_interval(&self) -> Option<&SizeFeatureRangeInterval>
Returns Some
if self
is a reference of variant RangeInterval
, and None
otherwise.
sourcepub fn as_mut_range_interval(&mut self) -> Option<&mut SizeFeatureRangeInterval>
pub fn as_mut_range_interval(&mut self) -> Option<&mut SizeFeatureRangeInterval>
Returns Some
if self
is a mutable reference of variant RangeInterval
, and None
otherwise.
sourcepub fn expect_range_interval(self) -> SizeFeatureRangeIntervalwhere
Self: Debug,
pub fn expect_range_interval(self) -> SizeFeatureRangeIntervalwhere Self: Debug,
Unwraps the value, yielding the content of RangeInterval
.
Panics
Panics if the value is not RangeInterval
, with a panic message including the content of self
.
sourcepub fn range_interval(self) -> Option<SizeFeatureRangeInterval>
pub fn range_interval(self) -> Option<SizeFeatureRangeInterval>
Returns Some
if self
is of variant RangeInterval
, and None
otherwise.
Trait Implementations§
source§impl Clone for SizeFeature
impl Clone for SizeFeature
source§fn clone(&self) -> SizeFeature
fn clone(&self) -> SizeFeature
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SizeFeature
impl Debug for SizeFeature
source§impl EqIgnoreSpan for SizeFeature
impl EqIgnoreSpan for SizeFeature
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<SizeFeature> for QueryInParens
impl From<SizeFeature> for QueryInParens
source§fn from(v: SizeFeature) -> Self
fn from(v: SizeFeature) -> Self
source§impl From<SizeFeatureBoolean> for SizeFeature
impl From<SizeFeatureBoolean> for SizeFeature
source§fn from(v: SizeFeatureBoolean) -> Self
fn from(v: SizeFeatureBoolean) -> Self
source§impl From<SizeFeaturePlain> for SizeFeature
impl From<SizeFeaturePlain> for SizeFeature
source§fn from(v: SizeFeaturePlain) -> Self
fn from(v: SizeFeaturePlain) -> Self
source§impl From<SizeFeatureRange> for SizeFeature
impl From<SizeFeatureRange> for SizeFeature
source§fn from(v: SizeFeatureRange) -> Self
fn from(v: SizeFeatureRange) -> Self
source§impl From<SizeFeatureRangeInterval> for SizeFeature
impl From<SizeFeatureRangeInterval> for SizeFeature
source§fn from(v: SizeFeatureRangeInterval) -> Self
fn from(v: SizeFeatureRangeInterval) -> Self
source§impl Hash for SizeFeature
impl Hash for SizeFeature
source§impl PartialEq<SizeFeature> for SizeFeature
impl PartialEq<SizeFeature> for SizeFeature
source§fn eq(&self, other: &SizeFeature) -> bool
fn eq(&self, other: &SizeFeature) -> bool
self
and other
values to be equal, and is used
by ==
.