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 combine(&self, _other: &Self) -> CombineResult<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 combine(&self, _other: &Self) -> CombineResult<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. Types that implement Hash can override this for better performance.

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.

Implementations on Foreign Types§

Source§

impl StylePropValue for IndentStyle

Source§

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

Source§

impl StylePropValue for Brush

Source§

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

Source§

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

Source§

impl StylePropValue for Overflow

Source§

impl StylePropValue for GridAutoFlow

Source§

impl StylePropValue for GridPlacement

Source§

impl StylePropValue for GridTemplateComponent<String>

Source§

impl StylePropValue for bool

Source§

impl StylePropValue for f32

Source§

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

Source§

impl StylePropValue for f64

Source§

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

Source§

impl StylePropValue for i32

Source§

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

Source§

impl StylePropValue for u16

Source§

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

Source§

impl StylePropValue for usize

Source§

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

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§

impl StylePropValue for Size<LengthPercentage>

Source§

impl StylePropValue for MaxTrackSizingFunction

Source§

impl StylePropValue for MinTrackSizingFunction

Source§

impl StylePropValue for String

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§

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§

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§

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§

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

Source§

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

Implementors§