Skip to main content

PropertyValueWithGlobal

Trait PropertyValueWithGlobal 

Source
pub trait PropertyValueWithGlobal {
    type Inner;

    // Required methods
    fn initial() -> Self;
    fn inherit() -> Self;
    fn unset() -> Self;
    fn var(expr: String) -> Self;
    fn var_in_shorthand(shorthand: String, expr: String) -> Self;
    fn to_inner_without_global(&self) -> Option<Self::Inner>;
    fn to_inner(
        &self,
        parent: Option<&Self::Inner>,
        default_value: Self::Inner,
        default_inherit: bool,
    ) -> Option<Self::Inner>;
}
Expand description

A trait for property global values, such as initial inherit unset.

Required Associated Types§

Source

type Inner

The type without global values.

Required Methods§

Source

fn initial() -> Self

Create a initial value.

Source

fn inherit() -> Self

Create a inherit value.

Source

fn unset() -> Self

Create a unset value.

Source

fn var(expr: String) -> Self

Create a var value.

Source

fn var_in_shorthand(shorthand: String, expr: String) -> Self

Create a special var value with a shorthand property.

When parsing a shorthand property with a var(...) value, the splitted properties should be marked this, and the shorthand is the original shorthand propety name.

Source

fn to_inner_without_global(&self) -> Option<Self::Inner>

Convert to Self::Inner type if possible.

Source

fn to_inner( &self, parent: Option<&Self::Inner>, default_value: Self::Inner, default_inherit: bool, ) -> Option<Self::Inner>

Convert to Self::Inner type with default value and specified inherit mode.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl PropertyValueWithGlobal for AlignContentType

Source§

impl PropertyValueWithGlobal for AlignItemsType

Source§

impl PropertyValueWithGlobal for AlignSelfType

Source§

impl PropertyValueWithGlobal for AngleType

Source§

impl PropertyValueWithGlobal for AnimationDirectionType

Source§

impl PropertyValueWithGlobal for AnimationFillModeType

Source§

impl PropertyValueWithGlobal for AnimationIterationCountType

Source§

impl PropertyValueWithGlobal for AnimationNameType

Source§

impl PropertyValueWithGlobal for AnimationPlayStateType

Source§

impl PropertyValueWithGlobal for AspectRatioType

Source§

impl PropertyValueWithGlobal for BackdropFilterType

Source§

impl PropertyValueWithGlobal for BackgroundAttachmentType

Source§

impl PropertyValueWithGlobal for BackgroundClipType

Source§

impl PropertyValueWithGlobal for BackgroundImageType

Source§

impl PropertyValueWithGlobal for BackgroundOriginType

Source§

impl PropertyValueWithGlobal for BackgroundPositionType

Source§

impl PropertyValueWithGlobal for BackgroundRepeatType

Source§

impl PropertyValueWithGlobal for BackgroundSizeType

Source§

impl PropertyValueWithGlobal for BorderRadiusType

Source§

impl PropertyValueWithGlobal for BorderStyleType

Source§

impl PropertyValueWithGlobal for BoxShadowType

Source§

impl PropertyValueWithGlobal for BoxSizingType

Source§

impl PropertyValueWithGlobal for ColorType

Source§

impl PropertyValueWithGlobal for ContainType

Source§

impl PropertyValueWithGlobal for ContentType

Source§

impl PropertyValueWithGlobal for CustomPropertyType

Source§

impl PropertyValueWithGlobal for DirectionType

Source§

impl PropertyValueWithGlobal for DisplayType

Source§

impl PropertyValueWithGlobal for FilterType

Source§

impl PropertyValueWithGlobal for FlexDirectionType

Source§

impl PropertyValueWithGlobal for FlexWrapType

Source§

impl PropertyValueWithGlobal for FloatType

Source§

impl PropertyValueWithGlobal for FontFamilyType

Source§

impl PropertyValueWithGlobal for FontFeatureSettingsType

Source§

impl PropertyValueWithGlobal for FontStyleType

Source§

impl PropertyValueWithGlobal for FontWeightType

Source§

impl PropertyValueWithGlobal for GapType

Source§

impl PropertyValueWithGlobal for GridAutoFlowType

Source§

impl PropertyValueWithGlobal for GridAutoType

Source§

impl PropertyValueWithGlobal for GridTemplateType

Source§

impl PropertyValueWithGlobal for JustifyContentType

Source§

impl PropertyValueWithGlobal for JustifyItemsType

Source§

impl PropertyValueWithGlobal for JustifySelfType

Source§

impl PropertyValueWithGlobal for LengthType

Source§

impl PropertyValueWithGlobal for LetterSpacingType

Source§

impl PropertyValueWithGlobal for LineHeightType

Source§

impl PropertyValueWithGlobal for ListStyleImageType

Source§

impl PropertyValueWithGlobal for ListStylePositionType

Source§

impl PropertyValueWithGlobal for ListStyleTypeType

Source§

impl PropertyValueWithGlobal for MaskModeType

Source§

impl PropertyValueWithGlobal for NumberType

Source§

impl PropertyValueWithGlobal for OverflowType

Source§

impl PropertyValueWithGlobal for OverflowWrapType

Source§

impl PropertyValueWithGlobal for PointerEventsType

Source§

impl PropertyValueWithGlobal for PositionType

Source§

impl PropertyValueWithGlobal for ResizeType

Source§

impl PropertyValueWithGlobal for ScrollbarType

Source§

impl PropertyValueWithGlobal for TextAlignType

Source§

impl PropertyValueWithGlobal for TextDecorationLineType

Source§

impl PropertyValueWithGlobal for TextDecorationStyleType

Source§

impl PropertyValueWithGlobal for TextDecorationThicknessType

Source§

impl PropertyValueWithGlobal for TextOverflowType

Source§

impl PropertyValueWithGlobal for TextShadowType

Source§

impl PropertyValueWithGlobal for TransformOriginType

Source§

impl PropertyValueWithGlobal for TransformType

Source§

impl PropertyValueWithGlobal for TransitionPropertyType

Source§

impl PropertyValueWithGlobal for TransitionTimeType

Source§

impl PropertyValueWithGlobal for TransitionTimingFnType

Source§

impl PropertyValueWithGlobal for VerticalAlignType

Source§

impl PropertyValueWithGlobal for VisibilityType

Source§

impl PropertyValueWithGlobal for WhiteSpaceType

Source§

impl PropertyValueWithGlobal for WillChangeType

Source§

impl PropertyValueWithGlobal for WordBreakType

Source§

impl PropertyValueWithGlobal for WordSpacingType

Source§

impl PropertyValueWithGlobal for WritingModeType

Source§

impl PropertyValueWithGlobal for WxEngineTouchEventType

Source§

impl PropertyValueWithGlobal for ZIndexType