pub struct MeasuredHeightMotionOutput {
pub state_id: GlobalElementId,
pub open: bool,
pub open_for_motion: bool,
pub wants_measurement: bool,
pub transition: TransitionOutput,
pub should_render: bool,
pub wrapper_refinement: LayoutRefinement,
pub wrapper_opacity: f32,
}Expand description
Output describing how to render a collapsible-style measured-height wrapper for the current element root.
This helper is usable by any “open/close with height animation” component (Collapsible, Accordion items, etc.). It does not build elements; it only describes the wrapper/refinement and how to update cached measurements once an element id is known.
Fields§
§state_id: GlobalElementId§open: boolThe requested open state (source of truth).
open_for_motion: boolWhether the transition should be driven as open this frame.
When there is no cached measurement, this is false even if open=true so that the first
open can mount an off-flow measurement wrapper before animating.
wants_measurement: boolWhether an off-flow measurement pass is required this frame.
transition: TransitionOutputTransition timeline output for open_for_motion.
should_render: boolWhether the content wrapper should be present in the element tree.
wrapper_refinement: LayoutRefinementLayout refinement for the wrapper (either a clipped-height wrapper or a measurement wrapper).
wrapper_opacity: f32Opacity to apply to the wrapper subtree (0.0 for measurement; 1.0 for visible content).
Trait Implementations§
Source§impl Clone for MeasuredHeightMotionOutput
impl Clone for MeasuredHeightMotionOutput
Source§fn clone(&self) -> MeasuredHeightMotionOutput
fn clone(&self) -> MeasuredHeightMotionOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more