pub type SpecifiedValue = Value<SpecifiedValueComponent>;
Expand description

Specified custom property value.

Aliased Type§

struct SpecifiedValue {
    pub(crate) v: ValueInner<GenericValueComponent<Length, Number, Percentage, LengthPercentage, Color, GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, CssUrl, Integer, Angle, Time, Resolution, GenericTransform<GenericTransformOperation<Angle, Number, Length, Integer, LengthPercentage>>>>,
    url_data: UrlExtraData,
}

Fields§

§v: ValueInner<GenericValueComponent<Length, Number, Percentage, LengthPercentage, Color, GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, CssUrl, Integer, Angle, Time, Resolution, GenericTransform<GenericTransformOperation<Angle, Number, Length, Integer, 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 SpecifiedValue

source

pub fn compute<'i, 't>( input: &mut CSSParser<'i, 't>, registration: &PropertyRegistrationData, url_data: &UrlExtraData, context: &Context<'_>, allow_computationally_dependent: AllowComputationallyDependent ) -> Result<ComputedValue, ()>

Convert a registered custom property to a Computed custom property value, given input and a property registration.

source

pub fn parse<'i, 't>( input: &mut CSSParser<'i, 't>, syntax: &Descriptor, url_data: &UrlExtraData, allow_computationally_dependent: AllowComputationallyDependent ) -> Result<Self, StyleParseError<'i>>

Parse and validate a registered custom property value according to its syntax descriptor, and check for computational independence.

source§

impl<Component> Value<Component>

source

pub fn new(v: ValueInner<Component>, url_data: UrlExtraData) -> Self

Creates a new registered custom property value.

source

pub fn universal(var: Arc<ComputedPropertyValue>) -> Self

Creates a new registered custom property value presumed to have universal syntax.

Trait Implementations§

source§

impl<Component: Animate> Animate for Value<Component>

source§

fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>

Animate a value towards another one, given an animation procedure.
source§

impl<Component: Clone> Clone for Value<Component>

source§

fn clone(&self) -> Value<Component>

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<Component: Debug> Debug for Value<Component>

source§

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

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

impl<Component> MallocSizeOf for Value<Component>where Component: MallocSizeOf,

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl<Component: PartialEq> PartialEq<Value<Component>> for Value<Component>

source§

fn eq(&self, other: &Value<Component>) -> bool

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

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

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

impl ToComputedValue for SpecifiedValue

source§

impl<Component> ToCss for Value<Component>where Component: ToCss,

source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere W: Write,

Serialize self in CSS syntax, writing to dest.
source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more
source§

impl<Component> StructuralPartialEq for Value<Component>