Skip to main content

CssFolder

Struct CssFolder 

Source
struct CssFolder {
    enable_font_size_px_to_rem: bool,
    parent_key: Option<String>,
    is_function_arg: bool,
    current_property: Option<String>,
}

Fields§

§enable_font_size_px_to_rem: bool§parent_key: Option<String>§is_function_arg: bool§current_property: Option<String>

Implementations§

Source§

impl CssFolder

Source

fn convert_font_size_to_rem_normalizer<'a>( &'a mut self, declaration: &'a mut Declaration, ) -> &'a mut Declaration

Trait Implementations§

Source§

impl Fold for CssFolder

Source§

fn fold_list_of_component_values( &mut self, list: ListOfComponentValues, ) -> ListOfComponentValues

Visit a node of type ListOfComponentValues. Read more
Source§

fn fold_declaration(&mut self, declaration: Declaration) -> Declaration

Visit a node of type Declaration. Read more
Source§

fn fold_dimension(&mut self, dimension: Dimension) -> Dimension

Visit a node of type Dimension. Read more
Source§

fn fold_length(&mut self, length: Length) -> Length

Visit a node of type Length. Read more
Source§

fn fold_function(&mut self, func: Function) -> Function

Visit a node of type Function. Read more
§

fn fold_absolute_color_base( &mut self, node: AbsoluteColorBase, ) -> AbsoluteColorBase

Visit a node of type AbsoluteColorBase. Read more
§

fn fold_alpha_value(&mut self, node: AlphaValue) -> AlphaValue

Visit a node of type AlphaValue. Read more
§

fn fold_an_plus_b(&mut self, node: AnPlusB) -> AnPlusB

Visit a node of type AnPlusB. Read more
§

fn fold_an_plus_b_notation(&mut self, node: AnPlusBNotation) -> AnPlusBNotation

Visit a node of type AnPlusBNotation. Read more
§

fn fold_angle(&mut self, node: Angle) -> Angle

Visit a node of type Angle. Read more
§

fn fold_angle_percentage(&mut self, node: AnglePercentage) -> AnglePercentage

Visit a node of type AnglePercentage. Read more
§

fn fold_any_namespace(&mut self, node: AnyNamespace) -> AnyNamespace

Visit a node of type AnyNamespace. Read more
§

fn fold_at_rule(&mut self, node: AtRule) -> AtRule

Visit a node of type AtRule. Read more
§

fn fold_at_rule_name(&mut self, node: AtRuleName) -> AtRuleName

Visit a node of type AtRuleName. Read more
§

fn fold_at_rule_prelude(&mut self, node: AtRulePrelude) -> AtRulePrelude

Visit a node of type AtRulePrelude. Read more
§

fn fold_atom(&mut self, node: Atom) -> Atom

Visit a node of type swc_atoms :: Atom. Read more
§

fn fold_attribute_selector( &mut self, node: AttributeSelector, ) -> AttributeSelector

Visit a node of type AttributeSelector. Read more
§

fn fold_attribute_selector_matcher( &mut self, node: AttributeSelectorMatcher, ) -> AttributeSelectorMatcher

Visit a node of type AttributeSelectorMatcher. Read more
§

fn fold_attribute_selector_matcher_value( &mut self, node: AttributeSelectorMatcherValue, ) -> AttributeSelectorMatcherValue

Visit a node of type AttributeSelectorMatcherValue. Read more
§

fn fold_attribute_selector_modifier( &mut self, node: AttributeSelectorModifier, ) -> AttributeSelectorModifier

Visit a node of type AttributeSelectorModifier. Read more
§

fn fold_attribute_selector_value( &mut self, node: AttributeSelectorValue, ) -> AttributeSelectorValue

Visit a node of type AttributeSelectorValue. Read more
§

fn fold_bin_op(&mut self, node: BinOp) -> BinOp

Visit a node of type BinOp. Read more
§

fn fold_calc_operator(&mut self, node: CalcOperator) -> CalcOperator

Visit a node of type CalcOperator. Read more
§

fn fold_calc_operator_type( &mut self, node: CalcOperatorType, ) -> CalcOperatorType

Visit a node of type CalcOperatorType. Read more
§

fn fold_calc_product(&mut self, node: CalcProduct) -> CalcProduct

Visit a node of type CalcProduct. Read more
§

fn fold_calc_product_or_operator( &mut self, node: CalcProductOrOperator, ) -> CalcProductOrOperator

Visit a node of type CalcProductOrOperator. Read more
§

fn fold_calc_product_or_operators( &mut self, node: Vec<CalcProductOrOperator>, ) -> Vec<CalcProductOrOperator>

Visit a node of type Vec < CalcProductOrOperator >. Read more
§

fn fold_calc_sum(&mut self, node: CalcSum) -> CalcSum

Visit a node of type CalcSum. Read more
§

fn fold_calc_value(&mut self, node: CalcValue) -> CalcValue

Visit a node of type CalcValue. Read more
§

fn fold_calc_value_or_operator( &mut self, node: CalcValueOrOperator, ) -> CalcValueOrOperator

Visit a node of type CalcValueOrOperator. Read more
§

fn fold_calc_value_or_operators( &mut self, node: Vec<CalcValueOrOperator>, ) -> Vec<CalcValueOrOperator>

Visit a node of type Vec < CalcValueOrOperator >. Read more
§

fn fold_class_selector(&mut self, node: ClassSelector) -> ClassSelector

Visit a node of type ClassSelector. Read more
§

fn fold_cmyk_component(&mut self, node: CmykComponent) -> CmykComponent

Visit a node of type CmykComponent. Read more
§

fn fold_color(&mut self, node: Color) -> Color

Visit a node of type Color. Read more
§

fn fold_color_profile_name( &mut self, node: ColorProfileName, ) -> ColorProfileName

Visit a node of type ColorProfileName. Read more
§

fn fold_combinator(&mut self, node: Combinator) -> Combinator

Visit a node of type Combinator. Read more
§

fn fold_combinator_value(&mut self, node: CombinatorValue) -> CombinatorValue

Visit a node of type CombinatorValue. Read more
§

fn fold_complex_selector(&mut self, node: ComplexSelector) -> ComplexSelector

Visit a node of type ComplexSelector. Read more
§

fn fold_complex_selector_children( &mut self, node: ComplexSelectorChildren, ) -> ComplexSelectorChildren

Visit a node of type ComplexSelectorChildren. Read more
§

fn fold_complex_selector_childrens( &mut self, node: Vec<ComplexSelectorChildren>, ) -> Vec<ComplexSelectorChildren>

Visit a node of type Vec < ComplexSelectorChildren >. Read more
§

fn fold_complex_selectors( &mut self, node: Vec<ComplexSelector>, ) -> Vec<ComplexSelector>

Visit a node of type Vec < ComplexSelector >. Read more
§

fn fold_component_value(&mut self, node: ComponentValue) -> ComponentValue

Visit a node of type ComponentValue. Read more
§

fn fold_component_values( &mut self, node: Vec<ComponentValue>, ) -> Vec<ComponentValue>

Visit a node of type Vec < ComponentValue >. Read more
§

fn fold_compound_selector(&mut self, node: CompoundSelector) -> CompoundSelector

Visit a node of type CompoundSelector. Read more
§

fn fold_compound_selector_list( &mut self, node: CompoundSelectorList, ) -> CompoundSelectorList

Visit a node of type CompoundSelectorList. Read more
§

fn fold_compound_selectors( &mut self, node: Vec<CompoundSelector>, ) -> Vec<CompoundSelector>

Visit a node of type Vec < CompoundSelector >. Read more
§

fn fold_container_condition( &mut self, node: ContainerCondition, ) -> ContainerCondition

Visit a node of type ContainerCondition. Read more
§

fn fold_container_name(&mut self, node: ContainerName) -> ContainerName

Visit a node of type ContainerName. Read more
§

fn fold_container_query(&mut self, node: ContainerQuery) -> ContainerQuery

Visit a node of type ContainerQuery. Read more
§

fn fold_container_query_and( &mut self, node: ContainerQueryAnd, ) -> ContainerQueryAnd

Visit a node of type ContainerQueryAnd. Read more
§

fn fold_container_query_not( &mut self, node: ContainerQueryNot, ) -> ContainerQueryNot

Visit a node of type ContainerQueryNot. Read more
§

fn fold_container_query_or( &mut self, node: ContainerQueryOr, ) -> ContainerQueryOr

Visit a node of type ContainerQueryOr. Read more
§

fn fold_container_query_type( &mut self, node: ContainerQueryType, ) -> ContainerQueryType

Visit a node of type ContainerQueryType. Read more
§

fn fold_container_query_types( &mut self, node: Vec<ContainerQueryType>, ) -> Vec<ContainerQueryType>

Visit a node of type Vec < ContainerQueryType >. Read more
§

fn fold_custom_highlight_name( &mut self, node: CustomHighlightName, ) -> CustomHighlightName

Visit a node of type CustomHighlightName. Read more
§

fn fold_custom_ident(&mut self, node: CustomIdent) -> CustomIdent

Visit a node of type CustomIdent. Read more
§

fn fold_custom_idents(&mut self, node: Vec<CustomIdent>) -> Vec<CustomIdent>

Visit a node of type Vec < CustomIdent >. Read more
§

fn fold_custom_media_query( &mut self, node: CustomMediaQuery, ) -> CustomMediaQuery

Visit a node of type CustomMediaQuery. Read more
§

fn fold_custom_media_query_media_type( &mut self, node: CustomMediaQueryMediaType, ) -> CustomMediaQueryMediaType

Visit a node of type CustomMediaQueryMediaType. Read more
§

fn fold_custom_property_name( &mut self, node: CustomPropertyName, ) -> CustomPropertyName

Visit a node of type CustomPropertyName. Read more
§

fn fold_dashed_ident(&mut self, node: DashedIdent) -> DashedIdent

Visit a node of type DashedIdent. Read more
§

fn fold_declaration_name(&mut self, node: DeclarationName) -> DeclarationName

Visit a node of type DeclarationName. Read more
§

fn fold_declaration_or_at_rule( &mut self, node: DeclarationOrAtRule, ) -> DeclarationOrAtRule

Visit a node of type DeclarationOrAtRule. Read more
§

fn fold_delimiter(&mut self, node: Delimiter) -> Delimiter

Visit a node of type Delimiter. Read more
§

fn fold_delimiter_value(&mut self, node: DelimiterValue) -> DelimiterValue

Visit a node of type DelimiterValue. Read more
§

fn fold_dimension_token(&mut self, node: DimensionToken) -> DimensionToken

Visit a node of type DimensionToken. Read more
§

fn fold_document_prelude(&mut self, node: DocumentPrelude) -> DocumentPrelude

Visit a node of type DocumentPrelude. Read more
§

fn fold_document_prelude_matching_function( &mut self, node: DocumentPreludeMatchingFunction, ) -> DocumentPreludeMatchingFunction

Visit a node of type DocumentPreludeMatchingFunction. Read more
§

fn fold_document_prelude_matching_functions( &mut self, node: Vec<DocumentPreludeMatchingFunction>, ) -> Vec<DocumentPreludeMatchingFunction>

Visit a node of type Vec < DocumentPreludeMatchingFunction >. Read more
§

fn fold_extension_name(&mut self, node: ExtensionName) -> ExtensionName

Visit a node of type ExtensionName. Read more
§

fn fold_family_name(&mut self, node: FamilyName) -> FamilyName

Visit a node of type FamilyName. Read more
§

fn fold_family_names(&mut self, node: Vec<FamilyName>) -> Vec<FamilyName>

Visit a node of type Vec < FamilyName >. Read more
§

fn fold_flex(&mut self, node: Flex) -> Flex

Visit a node of type Flex. Read more
§

fn fold_font_feature_values_prelude( &mut self, node: FontFeatureValuesPrelude, ) -> FontFeatureValuesPrelude

Visit a node of type FontFeatureValuesPrelude. Read more
§

fn fold_forgiving_complex_selector( &mut self, node: ForgivingComplexSelector, ) -> ForgivingComplexSelector

Visit a node of type ForgivingComplexSelector. Read more
§

fn fold_forgiving_complex_selectors( &mut self, node: Vec<ForgivingComplexSelector>, ) -> Vec<ForgivingComplexSelector>

Visit a node of type Vec < ForgivingComplexSelector >. Read more
§

fn fold_forgiving_relative_selector( &mut self, node: ForgivingRelativeSelector, ) -> ForgivingRelativeSelector

Visit a node of type ForgivingRelativeSelector. Read more
§

fn fold_forgiving_relative_selector_list( &mut self, node: ForgivingRelativeSelectorList, ) -> ForgivingRelativeSelectorList

Visit a node of type ForgivingRelativeSelectorList. Read more
§

fn fold_forgiving_relative_selectors( &mut self, node: Vec<ForgivingRelativeSelector>, ) -> Vec<ForgivingRelativeSelector>

Visit a node of type Vec < ForgivingRelativeSelector >. Read more
§

fn fold_forgiving_selector_list( &mut self, node: ForgivingSelectorList, ) -> ForgivingSelectorList

Visit a node of type ForgivingSelectorList. Read more
§

fn fold_frequency(&mut self, node: Frequency) -> Frequency

Visit a node of type Frequency. Read more
§

fn fold_frequency_percentage( &mut self, node: FrequencyPercentage, ) -> FrequencyPercentage

Visit a node of type FrequencyPercentage. Read more
§

fn fold_function_name(&mut self, node: FunctionName) -> FunctionName

Visit a node of type FunctionName. Read more
§

fn fold_general_enclosed(&mut self, node: GeneralEnclosed) -> GeneralEnclosed

Visit a node of type GeneralEnclosed. Read more
§

fn fold_hex_color(&mut self, node: HexColor) -> HexColor

Visit a node of type HexColor. Read more
§

fn fold_hue(&mut self, node: Hue) -> Hue

Visit a node of type Hue. Read more
§

fn fold_id_selector(&mut self, node: IdSelector) -> IdSelector

Visit a node of type IdSelector. Read more
§

fn fold_ident(&mut self, node: Ident) -> Ident

Visit a node of type Ident. Read more
§

fn fold_idents(&mut self, node: Vec<Ident>) -> Vec<Ident>

Visit a node of type Vec < Ident >. Read more
§

fn fold_import_conditions(&mut self, node: ImportConditions) -> ImportConditions

Visit a node of type ImportConditions. Read more
§

fn fold_import_href(&mut self, node: ImportHref) -> ImportHref

Visit a node of type ImportHref. Read more
§

fn fold_import_layer_name(&mut self, node: ImportLayerName) -> ImportLayerName

Visit a node of type ImportLayerName. Read more
§

fn fold_import_prelude(&mut self, node: ImportPrelude) -> ImportPrelude

Visit a node of type ImportPrelude. Read more
§

fn fold_important_flag(&mut self, node: ImportantFlag) -> ImportantFlag

Visit a node of type ImportantFlag. Read more
§

fn fold_integer(&mut self, node: Integer) -> Integer

Visit a node of type Integer. Read more
§

fn fold_keyframe_block(&mut self, node: KeyframeBlock) -> KeyframeBlock

Visit a node of type KeyframeBlock. Read more
§

fn fold_keyframe_selector(&mut self, node: KeyframeSelector) -> KeyframeSelector

Visit a node of type KeyframeSelector. Read more
§

fn fold_keyframe_selectors( &mut self, node: Vec<KeyframeSelector>, ) -> Vec<KeyframeSelector>

Visit a node of type Vec < KeyframeSelector >. Read more
§

fn fold_keyframes_name(&mut self, node: KeyframesName) -> KeyframesName

Visit a node of type KeyframesName. Read more
§

fn fold_keyframes_pseudo_function( &mut self, node: KeyframesPseudoFunction, ) -> KeyframesPseudoFunction

Visit a node of type KeyframesPseudoFunction. Read more
§

fn fold_keyframes_pseudo_prefix( &mut self, node: KeyframesPseudoPrefix, ) -> KeyframesPseudoPrefix

Visit a node of type KeyframesPseudoPrefix. Read more
§

fn fold_layer_name(&mut self, node: LayerName) -> LayerName

Visit a node of type LayerName. Read more
§

fn fold_layer_name_list(&mut self, node: LayerNameList) -> LayerNameList

Visit a node of type LayerNameList. Read more
§

fn fold_layer_names(&mut self, node: Vec<LayerName>) -> Vec<LayerName>

Visit a node of type Vec < LayerName >. Read more
§

fn fold_layer_prelude(&mut self, node: LayerPrelude) -> LayerPrelude

Visit a node of type LayerPrelude. Read more
§

fn fold_length_percentage(&mut self, node: LengthPercentage) -> LengthPercentage

Visit a node of type LengthPercentage. Read more
§

fn fold_media_and(&mut self, node: MediaAnd) -> MediaAnd

Visit a node of type MediaAnd. Read more
§

fn fold_media_condition(&mut self, node: MediaCondition) -> MediaCondition

Visit a node of type MediaCondition. Read more
§

fn fold_media_condition_all_type( &mut self, node: MediaConditionAllType, ) -> MediaConditionAllType

Visit a node of type MediaConditionAllType. Read more
§

fn fold_media_condition_all_types( &mut self, node: Vec<MediaConditionAllType>, ) -> Vec<MediaConditionAllType>

Visit a node of type Vec < MediaConditionAllType >. Read more
§

fn fold_media_condition_type( &mut self, node: MediaConditionType, ) -> MediaConditionType

Visit a node of type MediaConditionType. Read more
§

fn fold_media_condition_without_or( &mut self, node: MediaConditionWithoutOr, ) -> MediaConditionWithoutOr

Visit a node of type MediaConditionWithoutOr. Read more
§

fn fold_media_condition_without_or_type( &mut self, node: MediaConditionWithoutOrType, ) -> MediaConditionWithoutOrType

Visit a node of type MediaConditionWithoutOrType. Read more
§

fn fold_media_condition_without_or_types( &mut self, node: Vec<MediaConditionWithoutOrType>, ) -> Vec<MediaConditionWithoutOrType>

Visit a node of type Vec < MediaConditionWithoutOrType >. Read more
§

fn fold_media_feature(&mut self, node: MediaFeature) -> MediaFeature

Visit a node of type MediaFeature. Read more
§

fn fold_media_feature_boolean( &mut self, node: MediaFeatureBoolean, ) -> MediaFeatureBoolean

Visit a node of type MediaFeatureBoolean. Read more
§

fn fold_media_feature_name( &mut self, node: MediaFeatureName, ) -> MediaFeatureName

Visit a node of type MediaFeatureName. Read more
§

fn fold_media_feature_plain( &mut self, node: MediaFeaturePlain, ) -> MediaFeaturePlain

Visit a node of type MediaFeaturePlain. Read more
§

fn fold_media_feature_range( &mut self, node: MediaFeatureRange, ) -> MediaFeatureRange

Visit a node of type MediaFeatureRange. Read more
§

fn fold_media_feature_range_comparison( &mut self, node: MediaFeatureRangeComparison, ) -> MediaFeatureRangeComparison

Visit a node of type MediaFeatureRangeComparison. Read more
§

fn fold_media_feature_range_interval( &mut self, node: MediaFeatureRangeInterval, ) -> MediaFeatureRangeInterval

Visit a node of type MediaFeatureRangeInterval. Read more
§

fn fold_media_feature_value( &mut self, node: MediaFeatureValue, ) -> MediaFeatureValue

Visit a node of type MediaFeatureValue. Read more
§

fn fold_media_in_parens(&mut self, node: MediaInParens) -> MediaInParens

Visit a node of type MediaInParens. Read more
§

fn fold_media_not(&mut self, node: MediaNot) -> MediaNot

Visit a node of type MediaNot. Read more
§

fn fold_media_or(&mut self, node: MediaOr) -> MediaOr

Visit a node of type MediaOr. Read more
§

fn fold_media_query(&mut self, node: MediaQuery) -> MediaQuery

Visit a node of type MediaQuery. Read more
§

fn fold_media_query_list(&mut self, node: MediaQueryList) -> MediaQueryList

Visit a node of type MediaQueryList. Read more
§

fn fold_media_querys(&mut self, node: Vec<MediaQuery>) -> Vec<MediaQuery>

Visit a node of type Vec < MediaQuery >. Read more
§

fn fold_media_type(&mut self, node: MediaType) -> MediaType

Visit a node of type MediaType. Read more
§

fn fold_named_namespace(&mut self, node: NamedNamespace) -> NamedNamespace

Visit a node of type NamedNamespace. Read more
§

fn fold_namespace(&mut self, node: Namespace) -> Namespace

Visit a node of type Namespace. Read more
§

fn fold_namespace_prefix(&mut self, node: NamespacePrefix) -> NamespacePrefix

Visit a node of type NamespacePrefix. Read more
§

fn fold_namespace_prelude(&mut self, node: NamespacePrelude) -> NamespacePrelude

Visit a node of type NamespacePrelude. Read more
§

fn fold_namespace_prelude_uri( &mut self, node: NamespacePreludeUri, ) -> NamespacePreludeUri

Visit a node of type NamespacePreludeUri. Read more
§

fn fold_nesting_selector(&mut self, node: NestingSelector) -> NestingSelector

Visit a node of type NestingSelector. Read more
§

fn fold_number(&mut self, node: Number) -> Number

Visit a node of type Number. Read more
§

fn fold_number_type(&mut self, node: NumberType) -> NumberType

Visit a node of type NumberType. Read more
§

fn fold_opt_at_rule_prelude( &mut self, node: Option<Box<AtRulePrelude>>, ) -> Option<Box<AtRulePrelude>>

Visit a node of type Option < Box < AtRulePrelude > >. Read more
§

fn fold_opt_atom(&mut self, node: Option<Atom>) -> Option<Atom>

Visit a node of type Option < swc_atoms :: Atom >. Read more
§

fn fold_opt_attribute_selector_matcher( &mut self, node: Option<AttributeSelectorMatcher>, ) -> Option<AttributeSelectorMatcher>

Visit a node of type Option < AttributeSelectorMatcher >. Read more
§

fn fold_opt_attribute_selector_modifier( &mut self, node: Option<AttributeSelectorModifier>, ) -> Option<AttributeSelectorModifier>

Visit a node of type Option < AttributeSelectorModifier >. Read more
§

fn fold_opt_attribute_selector_value( &mut self, node: Option<AttributeSelectorValue>, ) -> Option<AttributeSelectorValue>

Visit a node of type Option < AttributeSelectorValue >. Read more
§

fn fold_opt_combinator( &mut self, node: Option<Combinator>, ) -> Option<Combinator>

Visit a node of type Option < Combinator >. Read more
§

fn fold_opt_container_name( &mut self, node: Option<ContainerName>, ) -> Option<ContainerName>

Visit a node of type Option < ContainerName >. Read more
§

fn fold_opt_forgiving_selector_list( &mut self, node: Option<ForgivingSelectorList>, ) -> Option<ForgivingSelectorList>

Visit a node of type Option < ForgivingSelectorList >. Read more
§

fn fold_opt_function( &mut self, node: Option<Box<Function>>, ) -> Option<Box<Function>>

Visit a node of type Option < Box < Function > >. Read more
§

fn fold_opt_ident(&mut self, node: Option<Ident>) -> Option<Ident>

Visit a node of type Option < Ident >. Read more
§

fn fold_opt_import_conditions( &mut self, node: Option<Box<ImportConditions>>, ) -> Option<Box<ImportConditions>>

Visit a node of type Option < Box < ImportConditions > >. Read more
§

fn fold_opt_import_layer_name( &mut self, node: Option<Box<ImportLayerName>>, ) -> Option<Box<ImportLayerName>>

Visit a node of type Option < Box < ImportLayerName > >. Read more
§

fn fold_opt_important_flag( &mut self, node: Option<ImportantFlag>, ) -> Option<ImportantFlag>

Visit a node of type Option < ImportantFlag >. Read more
§

fn fold_opt_media_condition_type( &mut self, node: Option<Box<MediaConditionType>>, ) -> Option<Box<MediaConditionType>>

Visit a node of type Option < Box < MediaConditionType > >. Read more
§

fn fold_opt_media_query_list( &mut self, node: Option<Box<MediaQueryList>>, ) -> Option<Box<MediaQueryList>>

Visit a node of type Option < Box < MediaQueryList > >. Read more
§

fn fold_opt_media_type(&mut self, node: Option<MediaType>) -> Option<MediaType>

Visit a node of type Option < MediaType >. Read more
§

fn fold_opt_namespace(&mut self, node: Option<Namespace>) -> Option<Namespace>

Visit a node of type Option < Namespace >. Read more
§

fn fold_opt_namespace_prefix( &mut self, node: Option<NamespacePrefix>, ) -> Option<NamespacePrefix>

Visit a node of type Option < NamespacePrefix >. Read more
§

fn fold_opt_nesting_selector( &mut self, node: Option<NestingSelector>, ) -> Option<NestingSelector>

Visit a node of type Option < NestingSelector >. Read more
§

fn fold_opt_number(&mut self, node: Option<Number>) -> Option<Number>

Visit a node of type Option < Number >. Read more
§

fn fold_opt_page_selector_pseudos( &mut self, node: Option<Vec<PageSelectorPseudo>>, ) -> Option<Vec<PageSelectorPseudo>>

Visit a node of type Option < Vec < PageSelectorPseudo > >. Read more
§

fn fold_opt_page_selector_type( &mut self, node: Option<PageSelectorType>, ) -> Option<PageSelectorType>

Visit a node of type Option < PageSelectorType >. Read more
§

fn fold_opt_pseudo_class_selector_childrens( &mut self, node: Option<Vec<PseudoClassSelectorChildren>>, ) -> Option<Vec<PseudoClassSelectorChildren>>

Visit a node of type Option < Vec < PseudoClassSelectorChildren > >. Read more
§

fn fold_opt_pseudo_element_selector_childrens( &mut self, node: Option<Vec<PseudoElementSelectorChildren>>, ) -> Option<Vec<PseudoElementSelectorChildren>>

Visit a node of type Option < Vec < PseudoElementSelectorChildren > >. Read more
§

fn fold_opt_simple_block( &mut self, node: Option<SimpleBlock>, ) -> Option<SimpleBlock>

Visit a node of type Option < SimpleBlock >. Read more
§

fn fold_opt_type_selector( &mut self, node: Option<Box<TypeSelector>>, ) -> Option<Box<TypeSelector>>

Visit a node of type Option < Box < TypeSelector > >. Read more
§

fn fold_opt_url_modifiers( &mut self, node: Option<Vec<UrlModifier>>, ) -> Option<Vec<UrlModifier>>

Visit a node of type Option < Vec < UrlModifier > >. Read more
§

fn fold_opt_url_value( &mut self, node: Option<Box<UrlValue>>, ) -> Option<Box<UrlValue>>

Visit a node of type Option < Box < UrlValue > >. Read more
§

fn fold_page_selector(&mut self, node: PageSelector) -> PageSelector

Visit a node of type PageSelector. Read more
§

fn fold_page_selector_list( &mut self, node: PageSelectorList, ) -> PageSelectorList

Visit a node of type PageSelectorList. Read more
§

fn fold_page_selector_pseudo( &mut self, node: PageSelectorPseudo, ) -> PageSelectorPseudo

Visit a node of type PageSelectorPseudo. Read more
§

fn fold_page_selector_pseudos( &mut self, node: Vec<PageSelectorPseudo>, ) -> Vec<PageSelectorPseudo>

Visit a node of type Vec < PageSelectorPseudo >. Read more
§

fn fold_page_selector_type( &mut self, node: PageSelectorType, ) -> PageSelectorType

Visit a node of type PageSelectorType. Read more
§

fn fold_page_selectors(&mut self, node: Vec<PageSelector>) -> Vec<PageSelector>

Visit a node of type Vec < PageSelector >. Read more
§

fn fold_percentage(&mut self, node: Percentage) -> Percentage

Visit a node of type Percentage. Read more
§

fn fold_pseudo_class_selector( &mut self, node: PseudoClassSelector, ) -> PseudoClassSelector

Visit a node of type PseudoClassSelector. Read more
§

fn fold_pseudo_class_selector_children( &mut self, node: PseudoClassSelectorChildren, ) -> PseudoClassSelectorChildren

Visit a node of type PseudoClassSelectorChildren. Read more
§

fn fold_pseudo_class_selector_childrens( &mut self, node: Vec<PseudoClassSelectorChildren>, ) -> Vec<PseudoClassSelectorChildren>

Visit a node of type Vec < PseudoClassSelectorChildren >. Read more
§

fn fold_pseudo_element_selector( &mut self, node: PseudoElementSelector, ) -> PseudoElementSelector

Visit a node of type PseudoElementSelector. Read more
§

fn fold_pseudo_element_selector_children( &mut self, node: PseudoElementSelectorChildren, ) -> PseudoElementSelectorChildren

Visit a node of type PseudoElementSelectorChildren. Read more
§

fn fold_pseudo_element_selector_childrens( &mut self, node: Vec<PseudoElementSelectorChildren>, ) -> Vec<PseudoElementSelectorChildren>

Visit a node of type Vec < PseudoElementSelectorChildren >. Read more
§

fn fold_qualified_rule(&mut self, node: QualifiedRule) -> QualifiedRule

Visit a node of type QualifiedRule. Read more
§

fn fold_qualified_rule_prelude( &mut self, node: QualifiedRulePrelude, ) -> QualifiedRulePrelude

Visit a node of type QualifiedRulePrelude. Read more
§

fn fold_query_in_parens(&mut self, node: QueryInParens) -> QueryInParens

Visit a node of type QueryInParens. Read more
§

fn fold_ratio(&mut self, node: Ratio) -> Ratio

Visit a node of type Ratio. Read more
§

fn fold_relative_selector(&mut self, node: RelativeSelector) -> RelativeSelector

Visit a node of type RelativeSelector. Read more
§

fn fold_relative_selector_list( &mut self, node: RelativeSelectorList, ) -> RelativeSelectorList

Visit a node of type RelativeSelectorList. Read more
§

fn fold_relative_selectors( &mut self, node: Vec<RelativeSelector>, ) -> Vec<RelativeSelector>

Visit a node of type Vec < RelativeSelector >. Read more
§

fn fold_resolution(&mut self, node: Resolution) -> Resolution

Visit a node of type Resolution. Read more
§

fn fold_rule(&mut self, node: Rule) -> Rule

Visit a node of type Rule. Read more
§

fn fold_rules(&mut self, node: Vec<Rule>) -> Vec<Rule>

Visit a node of type Vec < Rule >. Read more
§

fn fold_scope_range(&mut self, node: ScopeRange) -> ScopeRange

Visit a node of type ScopeRange. Read more
§

fn fold_selector_list(&mut self, node: SelectorList) -> SelectorList

Visit a node of type SelectorList. Read more
§

fn fold_sequence_of_custom_idents( &mut self, node: SequenceOfCustomIdents, ) -> SequenceOfCustomIdents

Visit a node of type SequenceOfCustomIdents. Read more
§

fn fold_simple_block(&mut self, node: SimpleBlock) -> SimpleBlock

Visit a node of type SimpleBlock. Read more
§

fn fold_size_feature(&mut self, node: SizeFeature) -> SizeFeature

Visit a node of type SizeFeature. Read more
§

fn fold_size_feature_boolean( &mut self, node: SizeFeatureBoolean, ) -> SizeFeatureBoolean

Visit a node of type SizeFeatureBoolean. Read more
§

fn fold_size_feature_name(&mut self, node: SizeFeatureName) -> SizeFeatureName

Visit a node of type SizeFeatureName. Read more
§

fn fold_size_feature_plain( &mut self, node: SizeFeaturePlain, ) -> SizeFeaturePlain

Visit a node of type SizeFeaturePlain. Read more
§

fn fold_size_feature_range( &mut self, node: SizeFeatureRange, ) -> SizeFeatureRange

Visit a node of type SizeFeatureRange. Read more
§

fn fold_size_feature_range_comparison( &mut self, node: SizeFeatureRangeComparison, ) -> SizeFeatureRangeComparison

Visit a node of type SizeFeatureRangeComparison. Read more
§

fn fold_size_feature_range_interval( &mut self, node: SizeFeatureRangeInterval, ) -> SizeFeatureRangeInterval

Visit a node of type SizeFeatureRangeInterval. Read more
§

fn fold_size_feature_value( &mut self, node: SizeFeatureValue, ) -> SizeFeatureValue

Visit a node of type SizeFeatureValue. Read more
§

fn fold_span(&mut self, node: Span) -> Span

Visit a node of type swc_common :: Span. Read more
§

fn fold_str(&mut self, node: Str) -> Str

Visit a node of type Str. Read more
§

fn fold_style_block(&mut self, node: StyleBlock) -> StyleBlock

Visit a node of type StyleBlock. Read more
§

fn fold_stylesheet(&mut self, node: Stylesheet) -> Stylesheet

Visit a node of type Stylesheet. Read more
§

fn fold_subclass_selector(&mut self, node: SubclassSelector) -> SubclassSelector

Visit a node of type SubclassSelector. Read more
§

fn fold_subclass_selectors( &mut self, node: Vec<SubclassSelector>, ) -> Vec<SubclassSelector>

Visit a node of type Vec < SubclassSelector >. Read more
§

fn fold_supports_and(&mut self, node: SupportsAnd) -> SupportsAnd

Visit a node of type SupportsAnd. Read more
§

fn fold_supports_condition( &mut self, node: SupportsCondition, ) -> SupportsCondition

Visit a node of type SupportsCondition. Read more
§

fn fold_supports_condition_type( &mut self, node: SupportsConditionType, ) -> SupportsConditionType

Visit a node of type SupportsConditionType. Read more
§

fn fold_supports_condition_types( &mut self, node: Vec<SupportsConditionType>, ) -> Vec<SupportsConditionType>

Visit a node of type Vec < SupportsConditionType >. Read more
§

fn fold_supports_feature(&mut self, node: SupportsFeature) -> SupportsFeature

Visit a node of type SupportsFeature. Read more
§

fn fold_supports_in_parens( &mut self, node: SupportsInParens, ) -> SupportsInParens

Visit a node of type SupportsInParens. Read more
§

fn fold_supports_not(&mut self, node: SupportsNot) -> SupportsNot

Visit a node of type SupportsNot. Read more
§

fn fold_supports_or(&mut self, node: SupportsOr) -> SupportsOr

Visit a node of type SupportsOr. Read more
§

fn fold_tag_name_selector(&mut self, node: TagNameSelector) -> TagNameSelector

Visit a node of type TagNameSelector. Read more
§

fn fold_time(&mut self, node: Time) -> Time

Visit a node of type Time. Read more
§

fn fold_time_percentage(&mut self, node: TimePercentage) -> TimePercentage

Visit a node of type TimePercentage. Read more
§

fn fold_token(&mut self, node: Token) -> Token

Visit a node of type Token. Read more
§

fn fold_token_and_span(&mut self, node: TokenAndSpan) -> TokenAndSpan

Visit a node of type TokenAndSpan. Read more
§

fn fold_type_selector(&mut self, node: TypeSelector) -> TypeSelector

Visit a node of type TypeSelector. Read more
§

fn fold_unicode_range(&mut self, node: UnicodeRange) -> UnicodeRange

Visit a node of type UnicodeRange. Read more
§

fn fold_universal_selector( &mut self, node: UniversalSelector, ) -> UniversalSelector

Visit a node of type UniversalSelector. Read more
§

fn fold_unknown_dimension(&mut self, node: UnknownDimension) -> UnknownDimension

Visit a node of type UnknownDimension. Read more
§

fn fold_url(&mut self, node: Url) -> Url

Visit a node of type Url. Read more
§

fn fold_url_key_value(&mut self, node: UrlKeyValue) -> UrlKeyValue

Visit a node of type UrlKeyValue. Read more
§

fn fold_url_modifier(&mut self, node: UrlModifier) -> UrlModifier

Visit a node of type UrlModifier. Read more
§

fn fold_url_modifiers(&mut self, node: Vec<UrlModifier>) -> Vec<UrlModifier>

Visit a node of type Vec < UrlModifier >. Read more
§

fn fold_url_value(&mut self, node: UrlValue) -> UrlValue

Visit a node of type UrlValue. Read more
§

fn fold_url_value_raw(&mut self, node: UrlValueRaw) -> UrlValueRaw

Visit a node of type UrlValueRaw. Read more
§

fn fold_wq_name(&mut self, node: WqName) -> WqName

Visit a node of type WqName. Read more

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> Conv for T

§

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

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

impl<T, E> Emit<&T> for E
where E: Emit<T>, T: Spanned,

§

fn emit(&mut self, node: &&T) -> Result<(), Error>

§

impl<T, E> Emit<Box<T>> for E
where E: Emit<T>, T: Spanned,

§

fn emit(&mut self, node: &Box<T>) -> Result<(), Error>

§

impl<T, E> Emit<Option<T>> for E
where E: Emit<T>, T: Spanned,

§

fn emit(&mut self, node: &Option<T>) -> Result<(), Error>

§

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>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either [OwoColorize::fg] or a color-specific method, such as [OwoColorize::green], Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either [OwoColorize::bg] or a color-specific method, such as [OwoColorize::on_yellow], Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
§

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

§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling [Attribute] value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi [Quirk] value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1:

renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the [Condition] value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

impl<T, P> Parse<Box<T>> for P
where P: Parse<T>,

§

fn parse(&mut self) -> Result<Box<T>, Error>

§

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 metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be 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.
§

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
§

impl<T> ErasedDestructor for T
where T: 'static,