pub struct DefaultPerfRenderer { /* private fields */ }Expand description
The built-in PerfRenderer, used by PerfOverlayApp::new.
A single-row NNNfps MM.Mms minMM.M maxMM.M <backend> readout, right-aligned within its area,
on a solid background. Colored from a Theme (see DefaultPerfRenderer::theme), so a
caller matching a Theme-driven UI elsewhere doesn’t get a hardcoded, unrelated palette here.
A no-op before the first frame is recorded, or if the readout doesn’t fit area’s width.
Implementations§
Source§impl DefaultPerfRenderer
impl DefaultPerfRenderer
Sourcepub const fn new() -> Self
pub const fn new() -> Self
A renderer styled from Theme::DARK.
Sourcepub const fn theme(self, theme: Theme) -> Self
pub const fn theme(self, theme: Theme) -> Self
Sets the Theme the readout’s text/background colors come from: theme.fg on
theme.panel_bg. Defaults to Theme::DARK.
Trait Implementations§
Source§impl Clone for DefaultPerfRenderer
impl Clone for DefaultPerfRenderer
Source§fn clone(&self) -> DefaultPerfRenderer
fn clone(&self) -> DefaultPerfRenderer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DefaultPerfRenderer
impl Debug for DefaultPerfRenderer
Source§impl Default for DefaultPerfRenderer
impl Default for DefaultPerfRenderer
Source§impl PerfRenderer for DefaultPerfRenderer
impl PerfRenderer for DefaultPerfRenderer
impl Copy for DefaultPerfRenderer
Auto Trait Implementations§
impl Freeze for DefaultPerfRenderer
impl RefUnwindSafe for DefaultPerfRenderer
impl Send for DefaultPerfRenderer
impl Sync for DefaultPerfRenderer
impl Unpin for DefaultPerfRenderer
impl UnsafeUnpin for DefaultPerfRenderer
impl UnwindSafe for DefaultPerfRenderer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
Wraps
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
Wraps
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).