pub struct DebugService { /* private fields */ }
Expand description
Service for collecting and managing debug information across the application
Implementations§
Source§impl DebugService
impl DebugService
pub fn new(max_entries: usize) -> Self
Sourcepub fn clone_service(&self) -> Self
pub fn clone_service(&self) -> Self
Clone the service (for sharing between components)
Sourcepub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Enable or disable debug collection
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if debug collection is enabled
Sourcepub fn log(
&self,
component: &str,
level: DebugLevel,
message: String,
context: Option<String>,
)
pub fn log( &self, component: &str, level: DebugLevel, message: String, context: Option<String>, )
Log a debug message
Sourcepub fn trace(&self, component: &str, message: String, context: String)
pub fn trace(&self, component: &str, message: String, context: String)
Log a trace message with context
Sourcepub fn get_entries(&self) -> Vec<DebugEntry>
pub fn get_entries(&self) -> Vec<DebugEntry>
Get all debug entries
Sourcepub fn get_recent_entries(&self, count: usize) -> Vec<DebugEntry>
pub fn get_recent_entries(&self, count: usize) -> Vec<DebugEntry>
Get recent entries (last n)
Sourcepub fn generate_dump(&self) -> String
pub fn generate_dump(&self) -> String
Generate a formatted debug dump
Sourcepub fn generate_summary(&self) -> String
pub fn generate_summary(&self) -> String
Generate a summary of debug entries by component
Auto Trait Implementations§
impl Freeze for DebugService
impl RefUnwindSafe for DebugService
impl Send for DebugService
impl Sync for DebugService
impl Unpin for DebugService
impl UnwindSafe for DebugService
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more