Skip to main content

StylePropValue

Trait StylePropValue 

Source
pub trait StylePropValue:
    Clone
    + PartialEq
    + Debug {
    // Provided methods
    fn debug_view(&self) -> Option<Box<dyn View>> { ... }
    fn interpolate(&self, _other: &Self, _value: f64) -> Option<Self> { ... }
    fn content_hash(&self) -> u64 { ... }
}

Provided Methods§

Source

fn debug_view(&self) -> Option<Box<dyn View>>

Source

fn interpolate(&self, _other: &Self, _value: f64) -> Option<Self>

Source

fn content_hash(&self) -> u64

Compute a content-based hash for this value.

This hash is used for style caching - identical values should produce identical hashes. The default implementation uses the Debug representation, which works for most types but allocates. Types should override this for better performance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StylePropValue for Affine

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, t: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for Brush

Source§

fn content_hash(&self) -> u64

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

impl StylePropValue for Duration

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for Gradient

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, _other: &Self, _value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for GridAutoFlow

Source§

impl StylePropValue for GridPlacement

Source§

impl StylePropValue for GridTemplateComponent<String>

Source§

impl StylePropValue for IndentStyle

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

impl StylePropValue for MaxTrackSizingFunction

Source§

impl StylePropValue for MinTrackSizingFunction

Source§

impl StylePropValue for Overflow

Source§

impl StylePropValue for Rect

Source§

fn content_hash(&self) -> u64

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

impl StylePropValue for Size<LengthPercentage>

Source§

impl StylePropValue for String

Source§

impl StylePropValue for Stroke

Source§

fn content_hash(&self) -> u64

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

impl StylePropValue for bool

Source§

impl StylePropValue for f32

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for f64

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for i32

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for u16

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl StylePropValue for usize

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl<A: Array> StylePropValue for SmallVec<A>
where <A as Array>::Item: StylePropValue,

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl<T: StylePropValue + 'static> StylePropValue for Vec<T>

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Source§

impl<T: StylePropValue, M: StylePropValue> StylePropValue for MinMax<T, M>

Source§

impl<T: StylePropValue> StylePropValue for Line<T>

Source§

impl<T: StylePropValue> StylePropValue for Option<T>

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Self, value: f64) -> Option<Self>

Source§

fn content_hash(&self) -> u64

Implementors§

Source§

impl StylePropValue for AlignContent

Source§

impl StylePropValue for AlignItems

Source§

impl StylePropValue for Alignment

Source§

impl StylePropValue for AnchorAbout

Source§

impl StylePropValue for Angle

Source§

impl StylePropValue for Border

Source§

impl StylePropValue for BorderColor

Source§

impl StylePropValue for BorderRadius

Source§

impl StylePropValue for BoxShadow

Source§

impl StylePropValue for BoxSizing

Source§

impl StylePropValue for Color

Source§

impl StylePropValue for CursorStyle

Source§

impl StylePropValue for DesignSystem

Source§

impl StylePropValue for Display

Source§

impl StylePropValue for FlexDirection

Source§

impl StylePropValue for FlexWrap

Source§

impl StylePropValue for FontStyle

Source§

impl StylePropValue for FontWeight

Source§

impl StylePropValue for LanguageIdentifier

Source§

impl StylePropValue for Length

Source§

impl StylePropValue for LengthAuto

Source§

impl StylePropValue for LineHeightValue

Source§

impl StylePropValue for LocaleMap

Source§

impl StylePropValue for Margin

Source§

impl StylePropValue for ObjectFit

Source§

impl StylePropValue for ObjectPosition

Source§

impl StylePropValue for Padding

Source§

impl StylePropValue for Pct

Source§

impl StylePropValue for PointerEvents

Source§

impl StylePropValue for Position

Source§

impl StylePropValue for Pt

Source§

impl StylePropValue for Px

Source§

impl StylePropValue for PxPct

Source§

impl StylePropValue for PxPctAuto

Source§

impl StylePropValue for RenderWhitespace

Source§

impl StylePropValue for TextOverflow

Source§

impl StylePropValue for WrapMethod