pub struct TaffyLayoutEngine { /* private fields */ }Implementations§
Source§impl TaffyLayoutEngine
impl TaffyLayoutEngine
pub fn begin_frame(&mut self, frame_id: FrameId)
pub fn end_frame(&mut self)
pub fn layout_id_for_node(&self, node: NodeId) -> Option<LayoutId>
pub fn node_for_layout_id(&self, id: LayoutId) -> Option<NodeId>
pub fn solve_count(&self) -> u64
pub fn last_solve_time(&self) -> Duration
pub fn last_solve_root(&self) -> Option<NodeId>
pub fn last_solve_elapsed(&self) -> Duration
pub fn last_solve_measure_calls(&self) -> u64
pub fn last_solve_measure_cache_hits(&self) -> u64
pub fn last_solve_measure_time(&self) -> Duration
pub fn last_solve_measure_hotspots(&self) -> &[LayoutEngineMeasureHotspot]
pub fn set_measure_profiling_enabled(&mut self, enabled: bool)
pub fn child_layout_rect_if_solved( &self, parent: NodeId, child: NodeId, ) -> Option<Rect>
pub fn root_is_solved_for( &self, root: NodeId, available: LayoutSize<AvailableSpace>, scale_factor: f32, ) -> bool
pub fn compute_root_for_node_with_measure_if_needed( &mut self, root: NodeId, available: LayoutSize<AvailableSpace>, scale_factor: f32, measure: impl FnMut(NodeId, LayoutConstraints) -> Size, ) -> Option<LayoutId>
pub fn request_layout_node(&mut self, node: NodeId) -> Option<LayoutId>
pub fn set_measured(&mut self, node: NodeId, measured: bool)
pub fn set_measure_min_content_width_as_max( &mut self, node: NodeId, enabled: bool, )
pub fn set_style(&mut self, node: NodeId, style: Style)
pub fn set_children(&mut self, node: NodeId, children: &[NodeId])
pub fn compute_root_with_measure( &mut self, root: LayoutId, available: LayoutSize<AvailableSpace>, scale_factor: f32, measure: impl FnMut(NodeId, LayoutConstraints) -> Size, )
pub fn compute_root( &mut self, root: LayoutId, available: LayoutSize<AvailableSpace>, scale_factor: f32, )
pub fn layout_rect(&self, id: LayoutId) -> Rect
pub fn debug_dump_subtree_json( &self, root: NodeId, label_for_node: impl FnMut(NodeId) -> Option<String>, ) -> Value
Sourcepub fn debug_dump_subtree_json_with_info(
&self,
root: NodeId,
info_for_node: impl FnMut(NodeId) -> DebugDumpNodeInfo,
) -> Value
pub fn debug_dump_subtree_json_with_info( &self, root: NodeId, info_for_node: impl FnMut(NodeId) -> DebugDumpNodeInfo, ) -> Value
Dump a layout subtree with both a human-readable label and optional structured debug metadata per node.
pub fn debug_independent_root_nodes(&self) -> Vec<NodeId>
pub fn debug_write_subtree_json( &self, root: NodeId, dir: impl AsRef<Path>, filename: impl AsRef<Path>, label_for_node: impl FnMut(NodeId) -> Option<String>, ) -> Result<PathBuf>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaffyLayoutEngine
impl RefUnwindSafe for TaffyLayoutEngine
impl !Send for TaffyLayoutEngine
impl !Sync for TaffyLayoutEngine
impl Unpin for TaffyLayoutEngine
impl UnsafeUnpin for TaffyLayoutEngine
impl UnwindSafe for TaffyLayoutEngine
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