Enum swc_css_ast::ComponentValue
source · [−]pub enum ComponentValue {
Show 25 variants
PreservedToken(TokenAndSpan),
Function(Function),
SimpleBlock(SimpleBlock),
DeclarationOrAtRule(DeclarationOrAtRule),
Rule(Rule),
StyleBlock(StyleBlock),
KeyframeBlock(KeyframeBlock),
Ident(Ident),
DashedIdent(DashedIdent),
Str(Str),
Url(Url),
Integer(Integer),
Number(Number),
Percentage(Percentage),
Dimension(Dimension),
Ratio(Ratio),
UnicodeRange(UnicodeRange),
Color(Color),
AlphaValue(AlphaValue),
Hue(Hue),
CmykComponent(CmykComponent),
Delimiter(Delimiter),
CalcSum(CalcSum),
ComplexSelector(ComplexSelector),
LayerName(LayerName),
}
Variants
PreservedToken(TokenAndSpan)
Function(Function)
SimpleBlock(SimpleBlock)
DeclarationOrAtRule(DeclarationOrAtRule)
Rule(Rule)
StyleBlock(StyleBlock)
KeyframeBlock(KeyframeBlock)
Ident(Ident)
DashedIdent(DashedIdent)
Str(Str)
Url(Url)
Integer(Integer)
Number(Number)
Percentage(Percentage)
Dimension(Dimension)
Ratio(Ratio)
UnicodeRange(UnicodeRange)
Color(Color)
AlphaValue(AlphaValue)
Hue(Hue)
CmykComponent(CmykComponent)
Delimiter(Delimiter)
CalcSum(CalcSum)
ComplexSelector(ComplexSelector)
LayerName(LayerName)
Implementations
sourceimpl ComponentValue
impl ComponentValue
sourcepub fn is_preserved_token(&self) -> bool
pub fn is_preserved_token(&self) -> bool
Returns true
if self
is of variant PreservedToken
.
sourcepub fn as_preserved_token(&self) -> Option<&TokenAndSpan>
pub fn as_preserved_token(&self) -> Option<&TokenAndSpan>
Returns Some
if self
is a reference of variant PreservedToken
, and None
otherwise.
sourcepub fn as_mut_preserved_token(&mut self) -> Option<&mut TokenAndSpan>
pub fn as_mut_preserved_token(&mut self) -> Option<&mut TokenAndSpan>
Returns Some
if self
is a mutable reference of variant PreservedToken
, and None
otherwise.
sourcepub fn expect_preserved_token(self) -> TokenAndSpanwhere
Self: Debug,
pub fn expect_preserved_token(self) -> TokenAndSpanwhere
Self: Debug,
Unwraps the value, yielding the content of PreservedToken
.
Panics
Panics if the value is not PreservedToken
, with a panic message including the content of self
.
sourcepub fn preserved_token(self) -> Option<TokenAndSpan>
pub fn preserved_token(self) -> Option<TokenAndSpan>
Returns Some
if self
is of variant PreservedToken
, and None
otherwise.
sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Returns true
if self
is of variant Function
.
sourcepub fn as_function(&self) -> Option<&Function>
pub fn as_function(&self) -> Option<&Function>
Returns Some
if self
is a reference of variant Function
, and None
otherwise.
sourcepub fn as_mut_function(&mut self) -> Option<&mut Function>
pub fn as_mut_function(&mut self) -> Option<&mut Function>
Returns Some
if self
is a mutable reference of variant Function
, and None
otherwise.
sourcepub fn expect_function(self) -> Functionwhere
Self: Debug,
pub fn expect_function(self) -> Functionwhere
Self: Debug,
sourcepub fn function(self) -> Option<Function>
pub fn function(self) -> Option<Function>
Returns Some
if self
is of variant Function
, and None
otherwise.
sourcepub fn is_simple_block(&self) -> bool
pub fn is_simple_block(&self) -> bool
Returns true
if self
is of variant SimpleBlock
.
sourcepub fn as_simple_block(&self) -> Option<&SimpleBlock>
pub fn as_simple_block(&self) -> Option<&SimpleBlock>
Returns Some
if self
is a reference of variant SimpleBlock
, and None
otherwise.
sourcepub fn as_mut_simple_block(&mut self) -> Option<&mut SimpleBlock>
pub fn as_mut_simple_block(&mut self) -> Option<&mut SimpleBlock>
Returns Some
if self
is a mutable reference of variant SimpleBlock
, and None
otherwise.
sourcepub fn expect_simple_block(self) -> SimpleBlockwhere
Self: Debug,
pub fn expect_simple_block(self) -> SimpleBlockwhere
Self: Debug,
Unwraps the value, yielding the content of SimpleBlock
.
Panics
Panics if the value is not SimpleBlock
, with a panic message including the content of self
.
sourcepub fn simple_block(self) -> Option<SimpleBlock>
pub fn simple_block(self) -> Option<SimpleBlock>
Returns Some
if self
is of variant SimpleBlock
, and None
otherwise.
sourcepub fn is_declaration_or_at_rule(&self) -> bool
pub fn is_declaration_or_at_rule(&self) -> bool
Returns true
if self
is of variant DeclarationOrAtRule
.
sourcepub fn as_declaration_or_at_rule(&self) -> Option<&DeclarationOrAtRule>
pub fn as_declaration_or_at_rule(&self) -> Option<&DeclarationOrAtRule>
Returns Some
if self
is a reference of variant DeclarationOrAtRule
, and None
otherwise.
sourcepub fn as_mut_declaration_or_at_rule(
&mut self
) -> Option<&mut DeclarationOrAtRule>
pub fn as_mut_declaration_or_at_rule(
&mut self
) -> Option<&mut DeclarationOrAtRule>
Returns Some
if self
is a mutable reference of variant DeclarationOrAtRule
, and None
otherwise.
sourcepub fn expect_declaration_or_at_rule(self) -> DeclarationOrAtRulewhere
Self: Debug,
pub fn expect_declaration_or_at_rule(self) -> DeclarationOrAtRulewhere
Self: Debug,
Unwraps the value, yielding the content of DeclarationOrAtRule
.
Panics
Panics if the value is not DeclarationOrAtRule
, with a panic message including the content of self
.
sourcepub fn declaration_or_at_rule(self) -> Option<DeclarationOrAtRule>
pub fn declaration_or_at_rule(self) -> Option<DeclarationOrAtRule>
Returns Some
if self
is of variant DeclarationOrAtRule
, and None
otherwise.
sourcepub fn as_rule(&self) -> Option<&Rule>
pub fn as_rule(&self) -> Option<&Rule>
Returns Some
if self
is a reference of variant Rule
, and None
otherwise.
sourcepub fn as_mut_rule(&mut self) -> Option<&mut Rule>
pub fn as_mut_rule(&mut self) -> Option<&mut Rule>
Returns Some
if self
is a mutable reference of variant Rule
, and None
otherwise.
sourcepub fn expect_rule(self) -> Rulewhere
Self: Debug,
pub fn expect_rule(self) -> Rulewhere
Self: Debug,
sourcepub fn is_style_block(&self) -> bool
pub fn is_style_block(&self) -> bool
Returns true
if self
is of variant StyleBlock
.
sourcepub fn as_style_block(&self) -> Option<&StyleBlock>
pub fn as_style_block(&self) -> Option<&StyleBlock>
Returns Some
if self
is a reference of variant StyleBlock
, and None
otherwise.
sourcepub fn as_mut_style_block(&mut self) -> Option<&mut StyleBlock>
pub fn as_mut_style_block(&mut self) -> Option<&mut StyleBlock>
Returns Some
if self
is a mutable reference of variant StyleBlock
, and None
otherwise.
sourcepub fn expect_style_block(self) -> StyleBlockwhere
Self: Debug,
pub fn expect_style_block(self) -> StyleBlockwhere
Self: Debug,
Unwraps the value, yielding the content of StyleBlock
.
Panics
Panics if the value is not StyleBlock
, with a panic message including the content of self
.
sourcepub fn style_block(self) -> Option<StyleBlock>
pub fn style_block(self) -> Option<StyleBlock>
Returns Some
if self
is of variant StyleBlock
, and None
otherwise.
sourcepub fn is_keyframe_block(&self) -> bool
pub fn is_keyframe_block(&self) -> bool
Returns true
if self
is of variant KeyframeBlock
.
sourcepub fn as_keyframe_block(&self) -> Option<&KeyframeBlock>
pub fn as_keyframe_block(&self) -> Option<&KeyframeBlock>
Returns Some
if self
is a reference of variant KeyframeBlock
, and None
otherwise.
sourcepub fn as_mut_keyframe_block(&mut self) -> Option<&mut KeyframeBlock>
pub fn as_mut_keyframe_block(&mut self) -> Option<&mut KeyframeBlock>
Returns Some
if self
is a mutable reference of variant KeyframeBlock
, and None
otherwise.
sourcepub fn expect_keyframe_block(self) -> KeyframeBlockwhere
Self: Debug,
pub fn expect_keyframe_block(self) -> KeyframeBlockwhere
Self: Debug,
Unwraps the value, yielding the content of KeyframeBlock
.
Panics
Panics if the value is not KeyframeBlock
, with a panic message including the content of self
.
sourcepub fn keyframe_block(self) -> Option<KeyframeBlock>
pub fn keyframe_block(self) -> Option<KeyframeBlock>
Returns Some
if self
is of variant KeyframeBlock
, and None
otherwise.
sourcepub fn as_ident(&self) -> Option<&Ident>
pub fn as_ident(&self) -> Option<&Ident>
Returns Some
if self
is a reference of variant Ident
, and None
otherwise.
sourcepub fn as_mut_ident(&mut self) -> Option<&mut Ident>
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
Returns Some
if self
is a mutable reference of variant Ident
, and None
otherwise.
sourcepub fn expect_ident(self) -> Identwhere
Self: Debug,
pub fn expect_ident(self) -> Identwhere
Self: Debug,
sourcepub fn ident(self) -> Option<Ident>
pub fn ident(self) -> Option<Ident>
Returns Some
if self
is of variant Ident
, and None
otherwise.
sourcepub fn is_dashed_ident(&self) -> bool
pub fn is_dashed_ident(&self) -> bool
Returns true
if self
is of variant DashedIdent
.
sourcepub fn as_dashed_ident(&self) -> Option<&DashedIdent>
pub fn as_dashed_ident(&self) -> Option<&DashedIdent>
Returns Some
if self
is a reference of variant DashedIdent
, and None
otherwise.
sourcepub fn as_mut_dashed_ident(&mut self) -> Option<&mut DashedIdent>
pub fn as_mut_dashed_ident(&mut self) -> Option<&mut DashedIdent>
Returns Some
if self
is a mutable reference of variant DashedIdent
, and None
otherwise.
sourcepub fn expect_dashed_ident(self) -> DashedIdentwhere
Self: Debug,
pub fn expect_dashed_ident(self) -> DashedIdentwhere
Self: Debug,
Unwraps the value, yielding the content of DashedIdent
.
Panics
Panics if the value is not DashedIdent
, with a panic message including the content of self
.
sourcepub fn dashed_ident(self) -> Option<DashedIdent>
pub fn dashed_ident(self) -> Option<DashedIdent>
Returns Some
if self
is of variant DashedIdent
, and None
otherwise.
sourcepub fn as_str(&self) -> Option<&Str>
pub fn as_str(&self) -> Option<&Str>
Returns Some
if self
is a reference of variant Str
, and None
otherwise.
sourcepub fn as_mut_str(&mut self) -> Option<&mut Str>
pub fn as_mut_str(&mut self) -> Option<&mut Str>
Returns Some
if self
is a mutable reference of variant Str
, and None
otherwise.
sourcepub fn expect_str(self) -> Strwhere
Self: Debug,
pub fn expect_str(self) -> Strwhere
Self: Debug,
sourcepub fn as_url(&self) -> Option<&Url>
pub fn as_url(&self) -> Option<&Url>
Returns Some
if self
is a reference of variant Url
, and None
otherwise.
sourcepub fn as_mut_url(&mut self) -> Option<&mut Url>
pub fn as_mut_url(&mut self) -> Option<&mut Url>
Returns Some
if self
is a mutable reference of variant Url
, and None
otherwise.
sourcepub fn expect_url(self) -> Urlwhere
Self: Debug,
pub fn expect_url(self) -> Urlwhere
Self: Debug,
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true
if self
is of variant Integer
.
sourcepub fn as_integer(&self) -> Option<&Integer>
pub fn as_integer(&self) -> Option<&Integer>
Returns Some
if self
is a reference of variant Integer
, and None
otherwise.
sourcepub fn as_mut_integer(&mut self) -> Option<&mut Integer>
pub fn as_mut_integer(&mut self) -> Option<&mut Integer>
Returns Some
if self
is a mutable reference of variant Integer
, and None
otherwise.
sourcepub fn expect_integer(self) -> Integerwhere
Self: Debug,
pub fn expect_integer(self) -> Integerwhere
Self: Debug,
sourcepub fn integer(self) -> Option<Integer>
pub fn integer(self) -> Option<Integer>
Returns Some
if self
is of variant Integer
, and None
otherwise.
sourcepub fn as_number(&self) -> Option<&Number>
pub fn as_number(&self) -> Option<&Number>
Returns Some
if self
is a reference of variant Number
, and None
otherwise.
sourcepub fn as_mut_number(&mut self) -> Option<&mut Number>
pub fn as_mut_number(&mut self) -> Option<&mut Number>
Returns Some
if self
is a mutable reference of variant Number
, and None
otherwise.
sourcepub fn expect_number(self) -> Numberwhere
Self: Debug,
pub fn expect_number(self) -> Numberwhere
Self: Debug,
sourcepub fn number(self) -> Option<Number>
pub fn number(self) -> Option<Number>
Returns Some
if self
is of variant Number
, and None
otherwise.
sourcepub fn is_percentage(&self) -> bool
pub fn is_percentage(&self) -> bool
Returns true
if self
is of variant Percentage
.
sourcepub fn as_percentage(&self) -> Option<&Percentage>
pub fn as_percentage(&self) -> Option<&Percentage>
Returns Some
if self
is a reference of variant Percentage
, and None
otherwise.
sourcepub fn as_mut_percentage(&mut self) -> Option<&mut Percentage>
pub fn as_mut_percentage(&mut self) -> Option<&mut Percentage>
Returns Some
if self
is a mutable reference of variant Percentage
, and None
otherwise.
sourcepub fn expect_percentage(self) -> Percentagewhere
Self: Debug,
pub fn expect_percentage(self) -> Percentagewhere
Self: Debug,
Unwraps the value, yielding the content of Percentage
.
Panics
Panics if the value is not Percentage
, with a panic message including the content of self
.
sourcepub fn percentage(self) -> Option<Percentage>
pub fn percentage(self) -> Option<Percentage>
Returns Some
if self
is of variant Percentage
, and None
otherwise.
sourcepub fn is_dimension(&self) -> bool
pub fn is_dimension(&self) -> bool
Returns true
if self
is of variant Dimension
.
sourcepub fn as_dimension(&self) -> Option<&Dimension>
pub fn as_dimension(&self) -> Option<&Dimension>
Returns Some
if self
is a reference of variant Dimension
, and None
otherwise.
sourcepub fn as_mut_dimension(&mut self) -> Option<&mut Dimension>
pub fn as_mut_dimension(&mut self) -> Option<&mut Dimension>
Returns Some
if self
is a mutable reference of variant Dimension
, and None
otherwise.
sourcepub fn expect_dimension(self) -> Dimensionwhere
Self: Debug,
pub fn expect_dimension(self) -> Dimensionwhere
Self: Debug,
sourcepub fn dimension(self) -> Option<Dimension>
pub fn dimension(self) -> Option<Dimension>
Returns Some
if self
is of variant Dimension
, and None
otherwise.
sourcepub fn as_ratio(&self) -> Option<&Ratio>
pub fn as_ratio(&self) -> Option<&Ratio>
Returns Some
if self
is a reference of variant Ratio
, and None
otherwise.
sourcepub fn as_mut_ratio(&mut self) -> Option<&mut Ratio>
pub fn as_mut_ratio(&mut self) -> Option<&mut Ratio>
Returns Some
if self
is a mutable reference of variant Ratio
, and None
otherwise.
sourcepub fn expect_ratio(self) -> Ratiowhere
Self: Debug,
pub fn expect_ratio(self) -> Ratiowhere
Self: Debug,
sourcepub fn ratio(self) -> Option<Ratio>
pub fn ratio(self) -> Option<Ratio>
Returns Some
if self
is of variant Ratio
, and None
otherwise.
sourcepub fn is_unicode_range(&self) -> bool
pub fn is_unicode_range(&self) -> bool
Returns true
if self
is of variant UnicodeRange
.
sourcepub fn as_unicode_range(&self) -> Option<&UnicodeRange>
pub fn as_unicode_range(&self) -> Option<&UnicodeRange>
Returns Some
if self
is a reference of variant UnicodeRange
, and None
otherwise.
sourcepub fn as_mut_unicode_range(&mut self) -> Option<&mut UnicodeRange>
pub fn as_mut_unicode_range(&mut self) -> Option<&mut UnicodeRange>
Returns Some
if self
is a mutable reference of variant UnicodeRange
, and None
otherwise.
sourcepub fn expect_unicode_range(self) -> UnicodeRangewhere
Self: Debug,
pub fn expect_unicode_range(self) -> UnicodeRangewhere
Self: Debug,
Unwraps the value, yielding the content of UnicodeRange
.
Panics
Panics if the value is not UnicodeRange
, with a panic message including the content of self
.
sourcepub fn unicode_range(self) -> Option<UnicodeRange>
pub fn unicode_range(self) -> Option<UnicodeRange>
Returns Some
if self
is of variant UnicodeRange
, and None
otherwise.
sourcepub fn as_color(&self) -> Option<&Color>
pub fn as_color(&self) -> Option<&Color>
Returns Some
if self
is a reference of variant Color
, and None
otherwise.
sourcepub fn as_mut_color(&mut self) -> Option<&mut Color>
pub fn as_mut_color(&mut self) -> Option<&mut Color>
Returns Some
if self
is a mutable reference of variant Color
, and None
otherwise.
sourcepub fn expect_color(self) -> Colorwhere
Self: Debug,
pub fn expect_color(self) -> Colorwhere
Self: Debug,
sourcepub fn color(self) -> Option<Color>
pub fn color(self) -> Option<Color>
Returns Some
if self
is of variant Color
, and None
otherwise.
sourcepub fn is_alpha_value(&self) -> bool
pub fn is_alpha_value(&self) -> bool
Returns true
if self
is of variant AlphaValue
.
sourcepub fn as_alpha_value(&self) -> Option<&AlphaValue>
pub fn as_alpha_value(&self) -> Option<&AlphaValue>
Returns Some
if self
is a reference of variant AlphaValue
, and None
otherwise.
sourcepub fn as_mut_alpha_value(&mut self) -> Option<&mut AlphaValue>
pub fn as_mut_alpha_value(&mut self) -> Option<&mut AlphaValue>
Returns Some
if self
is a mutable reference of variant AlphaValue
, and None
otherwise.
sourcepub fn expect_alpha_value(self) -> AlphaValuewhere
Self: Debug,
pub fn expect_alpha_value(self) -> AlphaValuewhere
Self: Debug,
Unwraps the value, yielding the content of AlphaValue
.
Panics
Panics if the value is not AlphaValue
, with a panic message including the content of self
.
sourcepub fn alpha_value(self) -> Option<AlphaValue>
pub fn alpha_value(self) -> Option<AlphaValue>
Returns Some
if self
is of variant AlphaValue
, and None
otherwise.
sourcepub fn as_hue(&self) -> Option<&Hue>
pub fn as_hue(&self) -> Option<&Hue>
Returns Some
if self
is a reference of variant Hue
, and None
otherwise.
sourcepub fn as_mut_hue(&mut self) -> Option<&mut Hue>
pub fn as_mut_hue(&mut self) -> Option<&mut Hue>
Returns Some
if self
is a mutable reference of variant Hue
, and None
otherwise.
sourcepub fn expect_hue(self) -> Huewhere
Self: Debug,
pub fn expect_hue(self) -> Huewhere
Self: Debug,
sourcepub fn is_cmyk_component(&self) -> bool
pub fn is_cmyk_component(&self) -> bool
Returns true
if self
is of variant CmykComponent
.
sourcepub fn as_cmyk_component(&self) -> Option<&CmykComponent>
pub fn as_cmyk_component(&self) -> Option<&CmykComponent>
Returns Some
if self
is a reference of variant CmykComponent
, and None
otherwise.
sourcepub fn as_mut_cmyk_component(&mut self) -> Option<&mut CmykComponent>
pub fn as_mut_cmyk_component(&mut self) -> Option<&mut CmykComponent>
Returns Some
if self
is a mutable reference of variant CmykComponent
, and None
otherwise.
sourcepub fn expect_cmyk_component(self) -> CmykComponentwhere
Self: Debug,
pub fn expect_cmyk_component(self) -> CmykComponentwhere
Self: Debug,
Unwraps the value, yielding the content of CmykComponent
.
Panics
Panics if the value is not CmykComponent
, with a panic message including the content of self
.
sourcepub fn cmyk_component(self) -> Option<CmykComponent>
pub fn cmyk_component(self) -> Option<CmykComponent>
Returns Some
if self
is of variant CmykComponent
, and None
otherwise.
sourcepub fn is_delimiter(&self) -> bool
pub fn is_delimiter(&self) -> bool
Returns true
if self
is of variant Delimiter
.
sourcepub fn as_delimiter(&self) -> Option<&Delimiter>
pub fn as_delimiter(&self) -> Option<&Delimiter>
Returns Some
if self
is a reference of variant Delimiter
, and None
otherwise.
sourcepub fn as_mut_delimiter(&mut self) -> Option<&mut Delimiter>
pub fn as_mut_delimiter(&mut self) -> Option<&mut Delimiter>
Returns Some
if self
is a mutable reference of variant Delimiter
, and None
otherwise.
sourcepub fn expect_delimiter(self) -> Delimiterwhere
Self: Debug,
pub fn expect_delimiter(self) -> Delimiterwhere
Self: Debug,
sourcepub fn delimiter(self) -> Option<Delimiter>
pub fn delimiter(self) -> Option<Delimiter>
Returns Some
if self
is of variant Delimiter
, and None
otherwise.
sourcepub fn is_calc_sum(&self) -> bool
pub fn is_calc_sum(&self) -> bool
Returns true
if self
is of variant CalcSum
.
sourcepub fn as_calc_sum(&self) -> Option<&CalcSum>
pub fn as_calc_sum(&self) -> Option<&CalcSum>
Returns Some
if self
is a reference of variant CalcSum
, and None
otherwise.
sourcepub fn as_mut_calc_sum(&mut self) -> Option<&mut CalcSum>
pub fn as_mut_calc_sum(&mut self) -> Option<&mut CalcSum>
Returns Some
if self
is a mutable reference of variant CalcSum
, and None
otherwise.
sourcepub fn expect_calc_sum(self) -> CalcSumwhere
Self: Debug,
pub fn expect_calc_sum(self) -> CalcSumwhere
Self: Debug,
sourcepub fn calc_sum(self) -> Option<CalcSum>
pub fn calc_sum(self) -> Option<CalcSum>
Returns Some
if self
is of variant CalcSum
, and None
otherwise.
sourcepub fn is_complex_selector(&self) -> bool
pub fn is_complex_selector(&self) -> bool
Returns true
if self
is of variant ComplexSelector
.
sourcepub fn as_complex_selector(&self) -> Option<&ComplexSelector>
pub fn as_complex_selector(&self) -> Option<&ComplexSelector>
Returns Some
if self
is a reference of variant ComplexSelector
, and None
otherwise.
sourcepub fn as_mut_complex_selector(&mut self) -> Option<&mut ComplexSelector>
pub fn as_mut_complex_selector(&mut self) -> Option<&mut ComplexSelector>
Returns Some
if self
is a mutable reference of variant ComplexSelector
, and None
otherwise.
sourcepub fn expect_complex_selector(self) -> ComplexSelectorwhere
Self: Debug,
pub fn expect_complex_selector(self) -> ComplexSelectorwhere
Self: Debug,
Unwraps the value, yielding the content of ComplexSelector
.
Panics
Panics if the value is not ComplexSelector
, with a panic message including the content of self
.
sourcepub fn complex_selector(self) -> Option<ComplexSelector>
pub fn complex_selector(self) -> Option<ComplexSelector>
Returns Some
if self
is of variant ComplexSelector
, and None
otherwise.
sourcepub fn is_layer_name(&self) -> bool
pub fn is_layer_name(&self) -> bool
Returns true
if self
is of variant LayerName
.
sourcepub fn as_layer_name(&self) -> Option<&LayerName>
pub fn as_layer_name(&self) -> Option<&LayerName>
Returns Some
if self
is a reference of variant LayerName
, and None
otherwise.
sourcepub fn as_mut_layer_name(&mut self) -> Option<&mut LayerName>
pub fn as_mut_layer_name(&mut self) -> Option<&mut LayerName>
Returns Some
if self
is a mutable reference of variant LayerName
, and None
otherwise.
sourcepub fn expect_layer_name(self) -> LayerNamewhere
Self: Debug,
pub fn expect_layer_name(self) -> LayerNamewhere
Self: Debug,
sourcepub fn layer_name(self) -> Option<LayerName>
pub fn layer_name(self) -> Option<LayerName>
Returns Some
if self
is of variant LayerName
, and None
otherwise.
Trait Implementations
sourceimpl Clone for ComponentValue
impl Clone for ComponentValue
sourcefn clone(&self) -> ComponentValue
fn clone(&self) -> ComponentValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ComponentValue
impl Debug for ComponentValue
sourceimpl<'de> Deserialize<'de> for ComponentValue
impl<'de> Deserialize<'de> for ComponentValue
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 ComponentValue
impl EqIgnoreSpan for ComponentValue
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<AlphaValue> for ComponentValue
impl From<AlphaValue> for ComponentValue
sourcefn from(v: AlphaValue) -> Self
fn from(v: AlphaValue) -> Self
Converts to this type from the input type.
sourceimpl From<CalcSum> for ComponentValue
impl From<CalcSum> for ComponentValue
sourceimpl From<CmykComponent> for ComponentValue
impl From<CmykComponent> for ComponentValue
sourcefn from(v: CmykComponent) -> Self
fn from(v: CmykComponent) -> Self
Converts to this type from the input type.
sourceimpl From<Color> for ComponentValue
impl From<Color> for ComponentValue
sourceimpl From<ComplexSelector> for ComponentValue
impl From<ComplexSelector> for ComponentValue
sourcefn from(v: ComplexSelector) -> Self
fn from(v: ComplexSelector) -> Self
Converts to this type from the input type.
sourceimpl From<DashedIdent> for ComponentValue
impl From<DashedIdent> for ComponentValue
sourcefn from(v: DashedIdent) -> Self
fn from(v: DashedIdent) -> Self
Converts to this type from the input type.
sourceimpl From<DeclarationOrAtRule> for ComponentValue
impl From<DeclarationOrAtRule> for ComponentValue
sourcefn from(v: DeclarationOrAtRule) -> Self
fn from(v: DeclarationOrAtRule) -> Self
Converts to this type from the input type.
sourceimpl From<Delimiter> for ComponentValue
impl From<Delimiter> for ComponentValue
sourceimpl From<Dimension> for ComponentValue
impl From<Dimension> for ComponentValue
sourceimpl From<Function> for ComponentValue
impl From<Function> for ComponentValue
sourceimpl From<Hue> for ComponentValue
impl From<Hue> for ComponentValue
sourceimpl From<Ident> for ComponentValue
impl From<Ident> for ComponentValue
sourceimpl From<Integer> for ComponentValue
impl From<Integer> for ComponentValue
sourceimpl From<KeyframeBlock> for ComponentValue
impl From<KeyframeBlock> for ComponentValue
sourcefn from(v: KeyframeBlock) -> Self
fn from(v: KeyframeBlock) -> Self
Converts to this type from the input type.
sourceimpl From<LayerName> for ComponentValue
impl From<LayerName> for ComponentValue
sourceimpl From<Number> for ComponentValue
impl From<Number> for ComponentValue
sourceimpl From<Percentage> for ComponentValue
impl From<Percentage> for ComponentValue
sourcefn from(v: Percentage) -> Self
fn from(v: Percentage) -> Self
Converts to this type from the input type.
sourceimpl From<Ratio> for ComponentValue
impl From<Ratio> for ComponentValue
sourceimpl From<Rule> for ComponentValue
impl From<Rule> for ComponentValue
sourceimpl From<SimpleBlock> for ComponentValue
impl From<SimpleBlock> for ComponentValue
sourcefn from(v: SimpleBlock) -> Self
fn from(v: SimpleBlock) -> Self
Converts to this type from the input type.
sourceimpl From<Str> for ComponentValue
impl From<Str> for ComponentValue
sourceimpl From<StyleBlock> for ComponentValue
impl From<StyleBlock> for ComponentValue
sourcefn from(v: StyleBlock) -> Self
fn from(v: StyleBlock) -> Self
Converts to this type from the input type.
sourceimpl From<TokenAndSpan> for ComponentValue
impl From<TokenAndSpan> for ComponentValue
sourcefn from(v: TokenAndSpan) -> Self
fn from(v: TokenAndSpan) -> Self
Converts to this type from the input type.
sourceimpl From<UnicodeRange> for ComponentValue
impl From<UnicodeRange> for ComponentValue
sourcefn from(v: UnicodeRange) -> Self
fn from(v: UnicodeRange) -> Self
Converts to this type from the input type.
sourceimpl From<Url> for ComponentValue
impl From<Url> for ComponentValue
sourceimpl Hash for ComponentValue
impl Hash for ComponentValue
sourceimpl PartialEq<ComponentValue> for ComponentValue
impl PartialEq<ComponentValue> for ComponentValue
sourcefn eq(&self, other: &ComponentValue) -> bool
fn eq(&self, other: &ComponentValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for ComponentValue
impl Serialize for ComponentValue
sourceimpl Spanned for ComponentValue
impl Spanned for ComponentValue
impl Eq for ComponentValue
impl StructuralEq for ComponentValue
impl StructuralPartialEq for ComponentValue
Auto Trait Implementations
impl RefUnwindSafe for ComponentValue
impl Send for ComponentValue
impl Sync for ComponentValue
impl Unpin for ComponentValue
impl UnwindSafe for ComponentValue
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more