swc_css_ast

Enum ComponentValue

source
pub enum ComponentValue {
Show 32 variants PreservedToken(Box<TokenAndSpan>), Function(Box<Function>), SimpleBlock(Box<SimpleBlock>), AtRule(Box<AtRule>), QualifiedRule(Box<QualifiedRule>), ListOfComponentValues(Box<ListOfComponentValues>), KeyframeBlock(Box<KeyframeBlock>), Ident(Box<Ident>), DashedIdent(Box<DashedIdent>), Str(Box<Str>), Url(Box<Url>), Integer(Box<Integer>), Number(Box<Number>), Percentage(Box<Percentage>), Dimension(Box<Dimension>), LengthPercentage(Box<LengthPercentage>), FrequencyPercentage(Box<FrequencyPercentage>), AnglePercentage(Box<AnglePercentage>), TimePercentage(Box<TimePercentage>), Ratio(Box<Ratio>), UnicodeRange(Box<UnicodeRange>), Color(Box<Color>), AlphaValue(Box<AlphaValue>), Hue(Box<Hue>), CmykComponent(Box<CmykComponent>), Delimiter(Box<Delimiter>), CalcSum(Box<CalcSum>), ComplexSelector(Box<ComplexSelector>), LayerName(Box<LayerName>), SupportsCondition(Box<SupportsCondition>), Declaration(Box<Declaration>), IdSelector(Box<IdSelector>),
}

Variants§

§

PreservedToken(Box<TokenAndSpan>)

§

Function(Box<Function>)

§

SimpleBlock(Box<SimpleBlock>)

§

AtRule(Box<AtRule>)

§

QualifiedRule(Box<QualifiedRule>)

§

ListOfComponentValues(Box<ListOfComponentValues>)

§

KeyframeBlock(Box<KeyframeBlock>)

§

Ident(Box<Ident>)

§

DashedIdent(Box<DashedIdent>)

§

Str(Box<Str>)

§

Url(Box<Url>)

§

Integer(Box<Integer>)

§

Number(Box<Number>)

§

Percentage(Box<Percentage>)

§

Dimension(Box<Dimension>)

§

LengthPercentage(Box<LengthPercentage>)

§

FrequencyPercentage(Box<FrequencyPercentage>)

§

AnglePercentage(Box<AnglePercentage>)

§

TimePercentage(Box<TimePercentage>)

§

Ratio(Box<Ratio>)

§

UnicodeRange(Box<UnicodeRange>)

§

Color(Box<Color>)

§

AlphaValue(Box<AlphaValue>)

§

Hue(Box<Hue>)

§

CmykComponent(Box<CmykComponent>)

§

Delimiter(Box<Delimiter>)

§

CalcSum(Box<CalcSum>)

§

ComplexSelector(Box<ComplexSelector>)

§

LayerName(Box<LayerName>)

§

SupportsCondition(Box<SupportsCondition>)

§

Declaration(Box<Declaration>)

§

IdSelector(Box<IdSelector>)

Implementations§

source§

impl ComponentValue

source

pub const fn is_preserved_token(&self) -> bool

Returns true if self is of variant PreservedToken.

source

pub fn as_preserved_token(&self) -> Option<&Box<TokenAndSpan>>

Returns Some if self is a reference of variant PreservedToken, and None otherwise.

source

pub fn as_mut_preserved_token(&mut self) -> Option<&mut Box<TokenAndSpan>>

Returns Some if self is a mutable reference of variant PreservedToken, and None otherwise.

source

pub fn expect_preserved_token(self) -> Box<TokenAndSpan>
where 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.

source

pub fn preserved_token(self) -> Option<Box<TokenAndSpan>>

Returns Some if self is of variant PreservedToken, and None otherwise.

source

pub const fn is_function(&self) -> bool

Returns true if self is of variant Function.

source

pub fn as_function(&self) -> Option<&Box<Function>>

Returns Some if self is a reference of variant Function, and None otherwise.

source

pub fn as_mut_function(&mut self) -> Option<&mut Box<Function>>

Returns Some if self is a mutable reference of variant Function, and None otherwise.

source

pub fn expect_function(self) -> Box<Function>
where Self: Debug,

Unwraps the value, yielding the content of Function.

§Panics

Panics if the value is not Function, with a panic message including the content of self.

source

pub fn function(self) -> Option<Box<Function>>

Returns Some if self is of variant Function, and None otherwise.

source

pub const fn is_simple_block(&self) -> bool

Returns true if self is of variant SimpleBlock.

source

pub fn as_simple_block(&self) -> Option<&Box<SimpleBlock>>

Returns Some if self is a reference of variant SimpleBlock, and None otherwise.

source

pub fn as_mut_simple_block(&mut self) -> Option<&mut Box<SimpleBlock>>

Returns Some if self is a mutable reference of variant SimpleBlock, and None otherwise.

source

pub fn expect_simple_block(self) -> Box<SimpleBlock>
where 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.

source

pub fn simple_block(self) -> Option<Box<SimpleBlock>>

Returns Some if self is of variant SimpleBlock, and None otherwise.

source

pub const fn is_at_rule(&self) -> bool

Returns true if self is of variant AtRule.

source

pub fn as_at_rule(&self) -> Option<&Box<AtRule>>

Returns Some if self is a reference of variant AtRule, and None otherwise.

source

pub fn as_mut_at_rule(&mut self) -> Option<&mut Box<AtRule>>

Returns Some if self is a mutable reference of variant AtRule, and None otherwise.

source

pub fn expect_at_rule(self) -> Box<AtRule>
where Self: Debug,

Unwraps the value, yielding the content of AtRule.

§Panics

Panics if the value is not AtRule, with a panic message including the content of self.

source

pub fn at_rule(self) -> Option<Box<AtRule>>

Returns Some if self is of variant AtRule, and None otherwise.

source

pub const fn is_qualified_rule(&self) -> bool

Returns true if self is of variant QualifiedRule.

source

pub fn as_qualified_rule(&self) -> Option<&Box<QualifiedRule>>

Returns Some if self is a reference of variant QualifiedRule, and None otherwise.

source

pub fn as_mut_qualified_rule(&mut self) -> Option<&mut Box<QualifiedRule>>

Returns Some if self is a mutable reference of variant QualifiedRule, and None otherwise.

source

pub fn expect_qualified_rule(self) -> Box<QualifiedRule>
where Self: Debug,

Unwraps the value, yielding the content of QualifiedRule.

§Panics

Panics if the value is not QualifiedRule, with a panic message including the content of self.

source

pub fn qualified_rule(self) -> Option<Box<QualifiedRule>>

Returns Some if self is of variant QualifiedRule, and None otherwise.

source

pub const fn is_list_of_component_values(&self) -> bool

Returns true if self is of variant ListOfComponentValues.

source

pub fn as_list_of_component_values(&self) -> Option<&Box<ListOfComponentValues>>

Returns Some if self is a reference of variant ListOfComponentValues, and None otherwise.

source

pub fn as_mut_list_of_component_values( &mut self, ) -> Option<&mut Box<ListOfComponentValues>>

Returns Some if self is a mutable reference of variant ListOfComponentValues, and None otherwise.

source

pub fn expect_list_of_component_values(self) -> Box<ListOfComponentValues>
where Self: Debug,

Unwraps the value, yielding the content of ListOfComponentValues.

§Panics

Panics if the value is not ListOfComponentValues, with a panic message including the content of self.

source

pub fn list_of_component_values(self) -> Option<Box<ListOfComponentValues>>

Returns Some if self is of variant ListOfComponentValues, and None otherwise.

source

pub const fn is_keyframe_block(&self) -> bool

Returns true if self is of variant KeyframeBlock.

source

pub fn as_keyframe_block(&self) -> Option<&Box<KeyframeBlock>>

Returns Some if self is a reference of variant KeyframeBlock, and None otherwise.

source

pub fn as_mut_keyframe_block(&mut self) -> Option<&mut Box<KeyframeBlock>>

Returns Some if self is a mutable reference of variant KeyframeBlock, and None otherwise.

source

pub fn expect_keyframe_block(self) -> Box<KeyframeBlock>
where 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.

source

pub fn keyframe_block(self) -> Option<Box<KeyframeBlock>>

Returns Some if self is of variant KeyframeBlock, and None otherwise.

source

pub const fn is_ident(&self) -> bool

Returns true if self is of variant Ident.

source

pub fn as_ident(&self) -> Option<&Box<Ident>>

Returns Some if self is a reference of variant Ident, and None otherwise.

source

pub fn as_mut_ident(&mut self) -> Option<&mut Box<Ident>>

Returns Some if self is a mutable reference of variant Ident, and None otherwise.

source

pub fn expect_ident(self) -> Box<Ident>
where Self: Debug,

Unwraps the value, yielding the content of Ident.

§Panics

Panics if the value is not Ident, with a panic message including the content of self.

source

pub fn ident(self) -> Option<Box<Ident>>

Returns Some if self is of variant Ident, and None otherwise.

source

pub const fn is_dashed_ident(&self) -> bool

Returns true if self is of variant DashedIdent.

source

pub fn as_dashed_ident(&self) -> Option<&Box<DashedIdent>>

Returns Some if self is a reference of variant DashedIdent, and None otherwise.

source

pub fn as_mut_dashed_ident(&mut self) -> Option<&mut Box<DashedIdent>>

Returns Some if self is a mutable reference of variant DashedIdent, and None otherwise.

source

pub fn expect_dashed_ident(self) -> Box<DashedIdent>
where 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.

source

pub fn dashed_ident(self) -> Option<Box<DashedIdent>>

Returns Some if self is of variant DashedIdent, and None otherwise.

source

pub const fn is_str(&self) -> bool

Returns true if self is of variant Str.

source

pub fn as_str(&self) -> Option<&Box<Str>>

Returns Some if self is a reference of variant Str, and None otherwise.

source

pub fn as_mut_str(&mut self) -> Option<&mut Box<Str>>

Returns Some if self is a mutable reference of variant Str, and None otherwise.

source

pub fn expect_str(self) -> Box<Str>
where Self: Debug,

Unwraps the value, yielding the content of Str.

§Panics

Panics if the value is not Str, with a panic message including the content of self.

source

pub fn str(self) -> Option<Box<Str>>

Returns Some if self is of variant Str, and None otherwise.

source

pub const fn is_url(&self) -> bool

Returns true if self is of variant Url.

source

pub fn as_url(&self) -> Option<&Box<Url>>

Returns Some if self is a reference of variant Url, and None otherwise.

source

pub fn as_mut_url(&mut self) -> Option<&mut Box<Url>>

Returns Some if self is a mutable reference of variant Url, and None otherwise.

source

pub fn expect_url(self) -> Box<Url>
where Self: Debug,

Unwraps the value, yielding the content of Url.

§Panics

Panics if the value is not Url, with a panic message including the content of self.

source

pub fn url(self) -> Option<Box<Url>>

Returns Some if self is of variant Url, and None otherwise.

source

pub const fn is_integer(&self) -> bool

Returns true if self is of variant Integer.

source

pub fn as_integer(&self) -> Option<&Box<Integer>>

Returns Some if self is a reference of variant Integer, and None otherwise.

source

pub fn as_mut_integer(&mut self) -> Option<&mut Box<Integer>>

Returns Some if self is a mutable reference of variant Integer, and None otherwise.

source

pub fn expect_integer(self) -> Box<Integer>
where Self: Debug,

Unwraps the value, yielding the content of Integer.

§Panics

Panics if the value is not Integer, with a panic message including the content of self.

source

pub fn integer(self) -> Option<Box<Integer>>

Returns Some if self is of variant Integer, and None otherwise.

source

pub const fn is_number(&self) -> bool

Returns true if self is of variant Number.

source

pub fn as_number(&self) -> Option<&Box<Number>>

Returns Some if self is a reference of variant Number, and None otherwise.

source

pub fn as_mut_number(&mut self) -> Option<&mut Box<Number>>

Returns Some if self is a mutable reference of variant Number, and None otherwise.

source

pub fn expect_number(self) -> Box<Number>
where Self: Debug,

Unwraps the value, yielding the content of Number.

§Panics

Panics if the value is not Number, with a panic message including the content of self.

source

pub fn number(self) -> Option<Box<Number>>

Returns Some if self is of variant Number, and None otherwise.

source

pub const fn is_percentage(&self) -> bool

Returns true if self is of variant Percentage.

source

pub fn as_percentage(&self) -> Option<&Box<Percentage>>

Returns Some if self is a reference of variant Percentage, and None otherwise.

source

pub fn as_mut_percentage(&mut self) -> Option<&mut Box<Percentage>>

Returns Some if self is a mutable reference of variant Percentage, and None otherwise.

source

pub fn expect_percentage(self) -> Box<Percentage>
where 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.

source

pub fn percentage(self) -> Option<Box<Percentage>>

Returns Some if self is of variant Percentage, and None otherwise.

source

pub const fn is_dimension(&self) -> bool

Returns true if self is of variant Dimension.

source

pub fn as_dimension(&self) -> Option<&Box<Dimension>>

Returns Some if self is a reference of variant Dimension, and None otherwise.

source

pub fn as_mut_dimension(&mut self) -> Option<&mut Box<Dimension>>

Returns Some if self is a mutable reference of variant Dimension, and None otherwise.

source

pub fn expect_dimension(self) -> Box<Dimension>
where Self: Debug,

Unwraps the value, yielding the content of Dimension.

§Panics

Panics if the value is not Dimension, with a panic message including the content of self.

source

pub fn dimension(self) -> Option<Box<Dimension>>

Returns Some if self is of variant Dimension, and None otherwise.

source

pub const fn is_length_percentage(&self) -> bool

Returns true if self is of variant LengthPercentage.

source

pub fn as_length_percentage(&self) -> Option<&Box<LengthPercentage>>

Returns Some if self is a reference of variant LengthPercentage, and None otherwise.

source

pub fn as_mut_length_percentage(&mut self) -> Option<&mut Box<LengthPercentage>>

Returns Some if self is a mutable reference of variant LengthPercentage, and None otherwise.

source

pub fn expect_length_percentage(self) -> Box<LengthPercentage>
where Self: Debug,

Unwraps the value, yielding the content of LengthPercentage.

§Panics

Panics if the value is not LengthPercentage, with a panic message including the content of self.

source

pub fn length_percentage(self) -> Option<Box<LengthPercentage>>

Returns Some if self is of variant LengthPercentage, and None otherwise.

source

pub const fn is_frequency_percentage(&self) -> bool

Returns true if self is of variant FrequencyPercentage.

source

pub fn as_frequency_percentage(&self) -> Option<&Box<FrequencyPercentage>>

Returns Some if self is a reference of variant FrequencyPercentage, and None otherwise.

source

pub fn as_mut_frequency_percentage( &mut self, ) -> Option<&mut Box<FrequencyPercentage>>

Returns Some if self is a mutable reference of variant FrequencyPercentage, and None otherwise.

source

pub fn expect_frequency_percentage(self) -> Box<FrequencyPercentage>
where Self: Debug,

Unwraps the value, yielding the content of FrequencyPercentage.

§Panics

Panics if the value is not FrequencyPercentage, with a panic message including the content of self.

source

pub fn frequency_percentage(self) -> Option<Box<FrequencyPercentage>>

Returns Some if self is of variant FrequencyPercentage, and None otherwise.

source

pub const fn is_angle_percentage(&self) -> bool

Returns true if self is of variant AnglePercentage.

source

pub fn as_angle_percentage(&self) -> Option<&Box<AnglePercentage>>

Returns Some if self is a reference of variant AnglePercentage, and None otherwise.

source

pub fn as_mut_angle_percentage(&mut self) -> Option<&mut Box<AnglePercentage>>

Returns Some if self is a mutable reference of variant AnglePercentage, and None otherwise.

source

pub fn expect_angle_percentage(self) -> Box<AnglePercentage>
where Self: Debug,

Unwraps the value, yielding the content of AnglePercentage.

§Panics

Panics if the value is not AnglePercentage, with a panic message including the content of self.

source

pub fn angle_percentage(self) -> Option<Box<AnglePercentage>>

Returns Some if self is of variant AnglePercentage, and None otherwise.

source

pub const fn is_time_percentage(&self) -> bool

Returns true if self is of variant TimePercentage.

source

pub fn as_time_percentage(&self) -> Option<&Box<TimePercentage>>

Returns Some if self is a reference of variant TimePercentage, and None otherwise.

source

pub fn as_mut_time_percentage(&mut self) -> Option<&mut Box<TimePercentage>>

Returns Some if self is a mutable reference of variant TimePercentage, and None otherwise.

source

pub fn expect_time_percentage(self) -> Box<TimePercentage>
where Self: Debug,

Unwraps the value, yielding the content of TimePercentage.

§Panics

Panics if the value is not TimePercentage, with a panic message including the content of self.

source

pub fn time_percentage(self) -> Option<Box<TimePercentage>>

Returns Some if self is of variant TimePercentage, and None otherwise.

source

pub const fn is_ratio(&self) -> bool

Returns true if self is of variant Ratio.

source

pub fn as_ratio(&self) -> Option<&Box<Ratio>>

Returns Some if self is a reference of variant Ratio, and None otherwise.

source

pub fn as_mut_ratio(&mut self) -> Option<&mut Box<Ratio>>

Returns Some if self is a mutable reference of variant Ratio, and None otherwise.

source

pub fn expect_ratio(self) -> Box<Ratio>
where Self: Debug,

Unwraps the value, yielding the content of Ratio.

§Panics

Panics if the value is not Ratio, with a panic message including the content of self.

source

pub fn ratio(self) -> Option<Box<Ratio>>

Returns Some if self is of variant Ratio, and None otherwise.

source

pub const fn is_unicode_range(&self) -> bool

Returns true if self is of variant UnicodeRange.

source

pub fn as_unicode_range(&self) -> Option<&Box<UnicodeRange>>

Returns Some if self is a reference of variant UnicodeRange, and None otherwise.

source

pub fn as_mut_unicode_range(&mut self) -> Option<&mut Box<UnicodeRange>>

Returns Some if self is a mutable reference of variant UnicodeRange, and None otherwise.

source

pub fn expect_unicode_range(self) -> Box<UnicodeRange>
where 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.

source

pub fn unicode_range(self) -> Option<Box<UnicodeRange>>

Returns Some if self is of variant UnicodeRange, and None otherwise.

source

pub const fn is_color(&self) -> bool

Returns true if self is of variant Color.

source

pub fn as_color(&self) -> Option<&Box<Color>>

Returns Some if self is a reference of variant Color, and None otherwise.

source

pub fn as_mut_color(&mut self) -> Option<&mut Box<Color>>

Returns Some if self is a mutable reference of variant Color, and None otherwise.

source

pub fn expect_color(self) -> Box<Color>
where Self: Debug,

Unwraps the value, yielding the content of Color.

§Panics

Panics if the value is not Color, with a panic message including the content of self.

source

pub fn color(self) -> Option<Box<Color>>

Returns Some if self is of variant Color, and None otherwise.

source

pub const fn is_alpha_value(&self) -> bool

Returns true if self is of variant AlphaValue.

source

pub fn as_alpha_value(&self) -> Option<&Box<AlphaValue>>

Returns Some if self is a reference of variant AlphaValue, and None otherwise.

source

pub fn as_mut_alpha_value(&mut self) -> Option<&mut Box<AlphaValue>>

Returns Some if self is a mutable reference of variant AlphaValue, and None otherwise.

source

pub fn expect_alpha_value(self) -> Box<AlphaValue>
where 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.

source

pub fn alpha_value(self) -> Option<Box<AlphaValue>>

Returns Some if self is of variant AlphaValue, and None otherwise.

source

pub const fn is_hue(&self) -> bool

Returns true if self is of variant Hue.

source

pub fn as_hue(&self) -> Option<&Box<Hue>>

Returns Some if self is a reference of variant Hue, and None otherwise.

source

pub fn as_mut_hue(&mut self) -> Option<&mut Box<Hue>>

Returns Some if self is a mutable reference of variant Hue, and None otherwise.

source

pub fn expect_hue(self) -> Box<Hue>
where Self: Debug,

Unwraps the value, yielding the content of Hue.

§Panics

Panics if the value is not Hue, with a panic message including the content of self.

source

pub fn hue(self) -> Option<Box<Hue>>

Returns Some if self is of variant Hue, and None otherwise.

source

pub const fn is_cmyk_component(&self) -> bool

Returns true if self is of variant CmykComponent.

source

pub fn as_cmyk_component(&self) -> Option<&Box<CmykComponent>>

Returns Some if self is a reference of variant CmykComponent, and None otherwise.

source

pub fn as_mut_cmyk_component(&mut self) -> Option<&mut Box<CmykComponent>>

Returns Some if self is a mutable reference of variant CmykComponent, and None otherwise.

source

pub fn expect_cmyk_component(self) -> Box<CmykComponent>
where 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.

source

pub fn cmyk_component(self) -> Option<Box<CmykComponent>>

Returns Some if self is of variant CmykComponent, and None otherwise.

source

pub const fn is_delimiter(&self) -> bool

Returns true if self is of variant Delimiter.

source

pub fn as_delimiter(&self) -> Option<&Box<Delimiter>>

Returns Some if self is a reference of variant Delimiter, and None otherwise.

source

pub fn as_mut_delimiter(&mut self) -> Option<&mut Box<Delimiter>>

Returns Some if self is a mutable reference of variant Delimiter, and None otherwise.

source

pub fn expect_delimiter(self) -> Box<Delimiter>
where Self: Debug,

Unwraps the value, yielding the content of Delimiter.

§Panics

Panics if the value is not Delimiter, with a panic message including the content of self.

source

pub fn delimiter(self) -> Option<Box<Delimiter>>

Returns Some if self is of variant Delimiter, and None otherwise.

source

pub const fn is_calc_sum(&self) -> bool

Returns true if self is of variant CalcSum.

source

pub fn as_calc_sum(&self) -> Option<&Box<CalcSum>>

Returns Some if self is a reference of variant CalcSum, and None otherwise.

source

pub fn as_mut_calc_sum(&mut self) -> Option<&mut Box<CalcSum>>

Returns Some if self is a mutable reference of variant CalcSum, and None otherwise.

source

pub fn expect_calc_sum(self) -> Box<CalcSum>
where Self: Debug,

Unwraps the value, yielding the content of CalcSum.

§Panics

Panics if the value is not CalcSum, with a panic message including the content of self.

source

pub fn calc_sum(self) -> Option<Box<CalcSum>>

Returns Some if self is of variant CalcSum, and None otherwise.

source

pub const fn is_complex_selector(&self) -> bool

Returns true if self is of variant ComplexSelector.

source

pub fn as_complex_selector(&self) -> Option<&Box<ComplexSelector>>

Returns Some if self is a reference of variant ComplexSelector, and None otherwise.

source

pub fn as_mut_complex_selector(&mut self) -> Option<&mut Box<ComplexSelector>>

Returns Some if self is a mutable reference of variant ComplexSelector, and None otherwise.

source

pub fn expect_complex_selector(self) -> Box<ComplexSelector>
where 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.

source

pub fn complex_selector(self) -> Option<Box<ComplexSelector>>

Returns Some if self is of variant ComplexSelector, and None otherwise.

source

pub const fn is_layer_name(&self) -> bool

Returns true if self is of variant LayerName.

source

pub fn as_layer_name(&self) -> Option<&Box<LayerName>>

Returns Some if self is a reference of variant LayerName, and None otherwise.

source

pub fn as_mut_layer_name(&mut self) -> Option<&mut Box<LayerName>>

Returns Some if self is a mutable reference of variant LayerName, and None otherwise.

source

pub fn expect_layer_name(self) -> Box<LayerName>
where Self: Debug,

Unwraps the value, yielding the content of LayerName.

§Panics

Panics if the value is not LayerName, with a panic message including the content of self.

source

pub fn layer_name(self) -> Option<Box<LayerName>>

Returns Some if self is of variant LayerName, and None otherwise.

source

pub const fn is_supports_condition(&self) -> bool

Returns true if self is of variant SupportsCondition.

source

pub fn as_supports_condition(&self) -> Option<&Box<SupportsCondition>>

Returns Some if self is a reference of variant SupportsCondition, and None otherwise.

source

pub fn as_mut_supports_condition( &mut self, ) -> Option<&mut Box<SupportsCondition>>

Returns Some if self is a mutable reference of variant SupportsCondition, and None otherwise.

source

pub fn expect_supports_condition(self) -> Box<SupportsCondition>
where 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.

source

pub fn supports_condition(self) -> Option<Box<SupportsCondition>>

Returns Some if self is of variant SupportsCondition, and None otherwise.

source

pub const fn is_declaration(&self) -> bool

Returns true if self is of variant Declaration.

source

pub fn as_declaration(&self) -> Option<&Box<Declaration>>

Returns Some if self is a reference of variant Declaration, and None otherwise.

source

pub fn as_mut_declaration(&mut self) -> Option<&mut Box<Declaration>>

Returns Some if self is a mutable reference of variant Declaration, and None otherwise.

source

pub fn expect_declaration(self) -> Box<Declaration>
where 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.

source

pub fn declaration(self) -> Option<Box<Declaration>>

Returns Some if self is of variant Declaration, and None otherwise.

source

pub const fn is_id_selector(&self) -> bool

Returns true if self is of variant IdSelector.

source

pub fn as_id_selector(&self) -> Option<&Box<IdSelector>>

Returns Some if self is a reference of variant IdSelector, and None otherwise.

source

pub fn as_mut_id_selector(&mut self) -> Option<&mut Box<IdSelector>>

Returns Some if self is a mutable reference of variant IdSelector, and None otherwise.

source

pub fn expect_id_selector(self) -> Box<IdSelector>
where Self: Debug,

Unwraps the value, yielding the content of IdSelector.

§Panics

Panics if the value is not IdSelector, with a panic message including the content of self.

source

pub fn id_selector(self) -> Option<Box<IdSelector>>

Returns Some if self is of variant IdSelector, and None otherwise.

Trait Implementations§

source§

impl Clone for ComponentValue

source§

fn clone(&self) -> ComponentValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ComponentValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl EqIgnoreSpan for ComponentValue

source§

fn eq_ignore_span(&self, other: &Self) -> bool

source§

impl From<Box<AlphaValue>> for ComponentValue

source§

fn from(v: Box<AlphaValue>) -> Self

Converts to this type from the input type.
source§

impl From<Box<AnglePercentage>> for ComponentValue

source§

fn from(v: Box<AnglePercentage>) -> Self

Converts to this type from the input type.
source§

impl From<Box<AtRule>> for ComponentValue

source§

fn from(v: Box<AtRule>) -> Self

Converts to this type from the input type.
source§

impl From<Box<CalcSum>> for ComponentValue

source§

fn from(v: Box<CalcSum>) -> Self

Converts to this type from the input type.
source§

impl From<Box<CmykComponent>> for ComponentValue

source§

fn from(v: Box<CmykComponent>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Color>> for ComponentValue

source§

fn from(v: Box<Color>) -> Self

Converts to this type from the input type.
source§

impl From<Box<ComplexSelector>> for ComponentValue

source§

fn from(v: Box<ComplexSelector>) -> Self

Converts to this type from the input type.
source§

impl From<Box<DashedIdent>> for ComponentValue

source§

fn from(v: Box<DashedIdent>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Declaration>> for ComponentValue

source§

fn from(v: Box<Declaration>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Delimiter>> for ComponentValue

source§

fn from(v: Box<Delimiter>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Dimension>> for ComponentValue

source§

fn from(v: Box<Dimension>) -> Self

Converts to this type from the input type.
source§

impl From<Box<FrequencyPercentage>> for ComponentValue

source§

fn from(v: Box<FrequencyPercentage>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Function>> for ComponentValue

source§

fn from(v: Box<Function>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Hue>> for ComponentValue

source§

fn from(v: Box<Hue>) -> Self

Converts to this type from the input type.
source§

impl From<Box<IdSelector>> for ComponentValue

source§

fn from(v: Box<IdSelector>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Ident>> for ComponentValue

source§

fn from(v: Box<Ident>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Integer>> for ComponentValue

source§

fn from(v: Box<Integer>) -> Self

Converts to this type from the input type.
source§

impl From<Box<KeyframeBlock>> for ComponentValue

source§

fn from(v: Box<KeyframeBlock>) -> Self

Converts to this type from the input type.
source§

impl From<Box<LayerName>> for ComponentValue

source§

fn from(v: Box<LayerName>) -> Self

Converts to this type from the input type.
source§

impl From<Box<LengthPercentage>> for ComponentValue

source§

fn from(v: Box<LengthPercentage>) -> Self

Converts to this type from the input type.
source§

impl From<Box<ListOfComponentValues>> for ComponentValue

source§

fn from(v: Box<ListOfComponentValues>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Number>> for ComponentValue

source§

fn from(v: Box<Number>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Percentage>> for ComponentValue

source§

fn from(v: Box<Percentage>) -> Self

Converts to this type from the input type.
source§

impl From<Box<QualifiedRule>> for ComponentValue

source§

fn from(v: Box<QualifiedRule>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Ratio>> for ComponentValue

source§

fn from(v: Box<Ratio>) -> Self

Converts to this type from the input type.
source§

impl From<Box<SimpleBlock>> for ComponentValue

source§

fn from(v: Box<SimpleBlock>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Str>> for ComponentValue

source§

fn from(v: Box<Str>) -> Self

Converts to this type from the input type.
source§

impl From<Box<SupportsCondition>> for ComponentValue

source§

fn from(v: Box<SupportsCondition>) -> Self

Converts to this type from the input type.
source§

impl From<Box<TimePercentage>> for ComponentValue

source§

fn from(v: Box<TimePercentage>) -> Self

Converts to this type from the input type.
source§

impl From<Box<TokenAndSpan>> for ComponentValue

source§

fn from(v: Box<TokenAndSpan>) -> Self

Converts to this type from the input type.
source§

impl From<Box<UnicodeRange>> for ComponentValue

source§

fn from(v: Box<UnicodeRange>) -> Self

Converts to this type from the input type.
source§

impl From<Box<Url>> for ComponentValue

source§

fn from(v: Box<Url>) -> Self

Converts to this type from the input type.
source§

impl From<DeclarationOrAtRule> for ComponentValue

source§

fn from(rule: DeclarationOrAtRule) -> Self

Converts to this type from the input type.
source§

impl From<Rule> for ComponentValue

source§

fn from(rule: Rule) -> Self

Converts to this type from the input type.
source§

impl From<StyleBlock> for ComponentValue

source§

fn from(block: StyleBlock) -> Self

Converts to this type from the input type.
source§

impl Hash for ComponentValue

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for ComponentValue

source§

fn eq(&self, other: &ComponentValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Spanned for ComponentValue

source§

fn span(&self) -> Span

Get span of self.
§

fn span_lo(&self) -> BytePos

§

fn span_hi(&self) -> BytePos

source§

impl Eq for ComponentValue

source§

impl StructuralPartialEq for ComponentValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for T
where T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more