pub struct DebugContext { /* private fields */ }Expand description
Global debug context that can be shared across the application
Implementations§
Source§impl DebugContext
impl DebugContext
Sourcepub fn with_config(config: DebugConfig) -> Self
pub fn with_config(config: DebugConfig) -> Self
Create a new debug context with specific configuration
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if debugging is enabled
Sourcepub fn trace_level(&self) -> TraceLevel
pub fn trace_level(&self) -> TraceLevel
Get the current trace level
Sourcepub fn trace_event(&self, event: TraceEvent)
pub fn trace_event(&self, event: TraceEvent)
Trace an event
Sourcepub fn record_frame(&self, metrics: FrameMetrics)
pub fn record_frame(&self, metrics: FrameMetrics)
Record frame metrics
Sourcepub fn get_metrics(&self) -> Option<PerformanceMetrics>
pub fn get_metrics(&self) -> Option<PerformanceMetrics>
Get current performance metrics
Trait Implementations§
Source§impl Clone for DebugContext
impl Clone for DebugContext
Source§fn clone(&self) -> DebugContext
fn clone(&self) -> DebugContext
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 moreAuto Trait Implementations§
impl Freeze for DebugContext
impl RefUnwindSafe for DebugContext
impl Send for DebugContext
impl Sync for DebugContext
impl Unpin for DebugContext
impl UnsafeUnpin for DebugContext
impl UnwindSafe for DebugContext
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,
Source§impl<T> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter