#[repr(C)]pub enum TypedValue {
Unparsed(UnparsedValue),
Keyword(KeywordValue),
Numeric(NumericValue),
Transform(TransformValue),
Image(ImageValue),
}Expand description
A property-agnostic representation of a value, used by Typed OM.
TypedValue is the internal counterpart of the various CSSStyleValue
subclasses defined by the Typed OM specification. It captures values that
can be represented independently of any particular property.
Variants§
Unparsed(UnparsedValue)
An unparsed value consisting of string fragments and variable references.
This corresponds to CSSUnparsedValue in the Typed OM specification.
Keyword(KeywordValue)
A keyword value such as "block", "none", or "thin".
This corresponds to CSSKeywordValue in the Typed OM specification.
Keywords are represented as a standalone KeywordValue so they can
be carried and compared independently of any particular property.
Numeric(NumericValue)
A numeric value such as a length, angle, time, or a sum thereof.
This corresponds to the CSSNumericValue hierarchy in the Typed OM
specification, including CSSUnitValue and CSSMathSum.
Transform(TransformValue)
A transform value such as translate(10px, 20px).
This corresponds to CSSTransformValue in the Typed OM specification.
Image(ImageValue)
An image value.
This corresponds to CSSImageValue in the Typed OM specification.
Trait Implementations§
Source§impl Clone for TypedValue
impl Clone for TypedValue
Source§fn clone(&self) -> TypedValue
fn clone(&self) -> TypedValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TypedValue
impl RefUnwindSafe for TypedValue
impl Send for TypedValue
impl Sync for TypedValue
impl Unpin for TypedValue
impl UnsafeUnpin for TypedValue
impl UnwindSafe for TypedValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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