pub trait PerfRenderer {
// Required method
fn render(
&mut self,
stats: &FrameStats<FRAME_HISTORY>,
backend: &str,
area: Rect,
surface: &mut Surface<'_>,
);
}Expand description
Draws a super::PerfOverlayApp’s stats into a rectangular area of a Surface.
Implemented for any FnMut(&FrameStats<FRAME_HISTORY>, &str, Rect, &mut Surface<'_>) (pass
such a closure to PerfOverlayApp::with_closure; see
its docs for why that constructor exists instead of just accepting impl PerfRenderer
everywhere), so a plain closure is enough for a custom overlay; see the module
docs for composing one out of this crate’s widgets. DefaultPerfRenderer is the
built-in implementation, used by PerfOverlayApp::new.