pub struct ConditionContext {
pub width: f32,
pub height: Option<f32>,
pub hover: bool,
pub reduced_motion: bool,
pub states: Vec<String>,
pub breakpoints: IndexMap<String, f32>,
pub form_factor: Option<FormFactor>,
}Expand description
What a client knows when it flattens a style: the SURFACE box, the platform’s pointer and motion preference, the node’s interaction states and the theme’s breakpoint values (px).
Fields§
§width: f32§height: Option<f32>§hover: boolA hover-capable pointer (mouse, trackpad); false on touch.
reduced_motion: boolThe platform asks for reduced motion.
states: Vec<String>The node’s active states, the state keys without the colon
(hover, focus-visible, pressed).
breakpoints: IndexMap<String, f32>$breakpoint.<name> → px.
form_factor: Option<FormFactor>VAPP-218: the host’s form factor; None = derived from the width
(form_factor_of).
Trait Implementations§
Source§impl Clone for ConditionContext
impl Clone for ConditionContext
Source§impl Debug for ConditionContext
impl Debug for ConditionContext
Source§impl Default for ConditionContext
impl Default for ConditionContext
Source§impl<'de> Deserialize<'de> for ConditionContext
impl<'de> Deserialize<'de> for ConditionContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConditionContext
impl PartialEq for ConditionContext
Source§impl Serialize for ConditionContext
impl Serialize for ConditionContext
impl StructuralPartialEq for ConditionContext
Auto Trait Implementations§
impl Freeze for ConditionContext
impl RefUnwindSafe for ConditionContext
impl Send for ConditionContext
impl Sync for ConditionContext
impl Unpin for ConditionContext
impl UnsafeUnpin for ConditionContext
impl UnwindSafe for ConditionContext
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
Mutably borrows from an owned value. Read more