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
sourceimpl 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 fn is_boolean(&self) -> bool
pub 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 fn is_range_interval(&self) -> bool
pub 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
sourceimpl Clone for SizeFeature
impl Clone for SizeFeature
sourcefn clone(&self) -> SizeFeature
fn clone(&self) -> SizeFeature
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more