Type Alias style::properties_and_values::value::ComputedValue

source ·
pub type ComputedValue = Value<ComputedValueComponent>;
Expand description

Computed custom property value.

Aliased Type§

struct ComputedValue {
    pub(crate) v: ValueInner<GenericValueComponent<CSSPixelLength, f32, Percentage, LengthPercentage, GenericColor<Percentage>, GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, ComputedUrl, i32, Angle, Time, Resolution, GenericTransform<GenericTransformOperation<Angle, f32, CSSPixelLength, i32, LengthPercentage>>>>,
    url_data: UrlExtraData,
}

Fields§

§v: ValueInner<GenericValueComponent<CSSPixelLength, f32, Percentage, LengthPercentage, GenericColor<Percentage>, GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, ComputedUrl, i32, Angle, Time, Resolution, GenericTransform<GenericTransformOperation<Angle, f32, CSSPixelLength, i32, LengthPercentage>>>>

The registered custom property value.

§url_data: UrlExtraData

The URL data of the registered custom property from before it was computed. This is necessary to uncompute registered custom properties.

Implementations§

source§

impl ComputedValue

source

fn serialization_types( &self, ) -> (TokenSerializationType, TokenSerializationType)

source

fn to_declared_value(&self) -> Arc<ComputedPropertyValue>

source

pub fn as_universal(&self) -> Option<&Arc<ComputedPropertyValue>>

Returns the contained variable value if it exists, otherwise None.

source

pub fn is_parsed(&self, registration: &PropertyRegistrationData) -> bool

Returns whether the the property is computed.

source

pub fn to_variable_value(&self) -> ComputedPropertyValue

Convert to an untyped variable value.