pub struct Debug { /* private fields */ }Expand description
A bunch of performance information about your game. It can be drawn!

This is the default debug information that will be shown when the
Game::DEBUG_KEY is pressed.
Overriding Game::debug gives you access to this struct, allowing you to
implement your own debug view.
Implementations§
Source§impl Debug
impl Debug
Sourcepub fn load_duration(&self) -> Duration
pub fn load_duration(&self) -> Duration
Returns the time spent loading your Game.
Sourcepub fn frame_duration(&self) -> Duration
pub fn frame_duration(&self) -> Duration
Returns the average time spent per frame.
It includes time spent on V-Sync, if enabled.
Sourcepub fn interact_duration(&self) -> Duration
pub fn interact_duration(&self) -> Duration
Returns the average time spent processing events and running
Game::interact.
Sourcepub fn update_duration(&self) -> Duration
pub fn update_duration(&self) -> Duration
Returns the average time spent running Game::update.
Sourcepub fn draw_duration(&self) -> Duration
pub fn draw_duration(&self) -> Duration
Returns the average time spent running Game::draw.
Sourcepub fn ui_duration(&self) -> Duration
pub fn ui_duration(&self) -> Duration
Returns the average time spent rendering the UserInterface.
Sourcepub fn debug_duration(&self) -> Duration
pub fn debug_duration(&self) -> Duration
Returns the average time spent running Game::debug.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Debug
impl !RefUnwindSafe for Debug
impl !Send for Debug
impl !Sync for Debug
impl Unpin for Debug
impl !UnwindSafe for Debug
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> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.