pub struct LeafMeasureContext<'a> {
pub store: &'a NodeStore,
pub node: NodeId,
pub known_dimensions: Size<Option<f32>>,
pub available_space: Size<AvailableSpace>,
pub text_measurer: &'a dyn TextMeasurer,
pub resolved_text: &'a ResolvedTextStyle,
pub aspect_ratio: Option<f32>,
}Expand description
Compact, zero-allocation context passed to LeafMeasureHook::measure during Taffy leaf
measurement.
Fields§
§store: &'a NodeStoreLive NodeStore for reading the leaf’s own word tables and strings.
node: NodeIdThe leaf node being measured.
known_dimensions: Size<Option<f32>>Definite border-box dimensions already known by Taffy (if any).
available_space: Size<AvailableSpace>Available space from the parent container on each axis.
text_measurer: &'a dyn TextMeasurerActive text measurer installed on the layout engine (for TextInput, Gauge, etc.).
resolved_text: &'a ResolvedTextStyleInherited resolved typography for Self::node.
aspect_ratio: Option<f32>Resolved explicit CSS aspect-ratio (width / height, finite and > 0.0), if authored.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LeafMeasureContext<'a>
impl<'a> !UnwindSafe for LeafMeasureContext<'a>
impl<'a> Forget for LeafMeasureContext<'a>
impl<'a> Freeze for LeafMeasureContext<'a>
impl<'a> Move for LeafMeasureContext<'a>
impl<'a> Send for LeafMeasureContext<'a>
impl<'a> Sync for LeafMeasureContext<'a>
impl<'a> Unpin for LeafMeasureContext<'a>
impl<'a> UnsafeUnpin for LeafMeasureContext<'a>where
&'a NodeStore: UnsafeUnpin,
&'a dyn TextMeasurer: UnsafeUnpin,
&'a TextStyle<ResolvedFamily>: UnsafeUnpin,
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