Enum swc_css_ast::ComponentValue
source · pub enum ComponentValue {
Show 27 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),
SupportsCondition(SupportsCondition),
Declaration(Declaration),
}
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)
SupportsCondition(SupportsCondition)
Declaration(Declaration)
Implementations§
source§impl 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.
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_declaration(&self) -> bool
pub fn is_declaration(&self) -> bool
Returns true
if self
is of variant Declaration
.
sourcepub fn as_declaration(&self) -> Option<&Declaration>
pub fn as_declaration(&self) -> Option<&Declaration>
Returns Some
if self
is a reference of variant Declaration
, and None
otherwise.
sourcepub fn as_mut_declaration(&mut self) -> Option<&mut Declaration>
pub fn as_mut_declaration(&mut self) -> Option<&mut Declaration>
Returns Some
if self
is a mutable reference of variant Declaration
, and None
otherwise.
sourcepub fn expect_declaration(self) -> Declarationwhere
Self: Debug,
pub fn expect_declaration(self) -> Declarationwhere
Self: Debug,
Unwraps the value, yielding the content of Declaration
.
Panics
Panics if the value is not Declaration
, with a panic message including the content of self
.
sourcepub fn declaration(self) -> Option<Declaration>
pub fn declaration(self) -> Option<Declaration>
Returns Some
if self
is of variant Declaration
, and None
otherwise.
Trait Implementations§
source§impl Clone for ComponentValue
impl Clone for ComponentValue
source§fn clone(&self) -> ComponentValue
fn clone(&self) -> ComponentValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more