Skip to main content

DebugModule

Trait DebugModule 

Source
pub trait DebugModule {
    // Required method
    fn debug_section(&self, out: &mut DebugSection);
}
Expand description

A system that can describe itself in the debug panel.

The one method is handed a section that has already been cleared, and fills in a title and rows. Implement it on the thing that owns the numbers — the renderer’s frame timings, a network client’s counters — never on the panel.

Required Methods§

Source

fn debug_section(&self, out: &mut DebugSection)

Writes this system’s title and rows into out.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl DebugModule for BudgetStats

The row itself.

Labels are deliberately long enough to be unique across the whole panel: DebugModule labels share one namespace and nothing detects a collision, so a bare cpu beside the GPU section’s per-pass labels would be a row a reader — or a test searching the draw list — could pick up as the wrong one.

Source§

impl DebugModule for FrameStats

Source§

impl DebugModule for ReflectedSection<'_>