pub struct LayoutDebugger { /* private fields */ }Expand description
Layout constraint debugger.
Collects layout solve records for introspection. Thread-safe via internal synchronization; can be shared across the application.
Supports optional telemetry hooks for external observability (bd-32my.5).
Implementations§
Source§impl LayoutDebugger
impl LayoutDebugger
Sourcepub fn set_telemetry_hooks(&self, hooks: LayoutTelemetryHooks)
pub fn set_telemetry_hooks(&self, hooks: LayoutTelemetryHooks)
Attach telemetry hooks for external observability.
Sourcepub fn clear_telemetry_hooks(&self)
pub fn clear_telemetry_hooks(&self)
Remove telemetry hooks.
Sourcepub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Enable or disable debugging.
Sourcepub fn record(&self, record: LayoutRecord)
pub fn record(&self, record: LayoutRecord)
Record a flex layout solve.
Also fires telemetry hooks if attached:
on_layout_solvefor every recorded layouton_overflowif overflow detectedon_underflowif underflow detected
Sourcepub fn record_grid(&self, record: GridLayoutRecord)
pub fn record_grid(&self, record: GridLayoutRecord)
Record a grid layout solve.
Also fires telemetry hooks if attached.
Sourcepub fn snapshot(&self) -> Vec<LayoutRecord>
pub fn snapshot(&self) -> Vec<LayoutRecord>
Get a snapshot of all flex layout records.
Sourcepub fn snapshot_grids(&self) -> Vec<GridLayoutRecord>
pub fn snapshot_grids(&self) -> Vec<GridLayoutRecord>
Get a snapshot of all grid layout records.
Sourcepub fn overflows(&self) -> Vec<LayoutRecord>
pub fn overflows(&self) -> Vec<LayoutRecord>
Get records with overflow conditions.
Sourcepub fn underflows(&self) -> Vec<LayoutRecord>
pub fn underflows(&self) -> Vec<LayoutRecord>
Get records with underflow conditions.
Sourcepub fn export_dot(&self) -> String
pub fn export_dot(&self) -> String
Export to Graphviz DOT format for visualization.
Each layout becomes a node, with edges representing parent-child relationships (if parent_index is set).