pub struct DebugConfig {
pub enabled: bool,
pub trace_level: TraceLevel,
pub collect_metrics: bool,
pub show_overlay: bool,
pub format: OutputFormat,
}Expand description
Debug configuration
Fields§
§enabled: boolWhether debugging is enabled
trace_level: TraceLevelTrace level for output
collect_metrics: boolWhether to collect performance metrics
show_overlay: boolWhether to show debug overlay (future feature)
format: OutputFormatOutput format
Implementations§
Source§impl DebugConfig
impl DebugConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create configuration from environment variables
Environment variables:
HOJICHA_DEBUG: Enable debugging (1, true, yes)HOJICHA_TRACE: Trace level (commands,messages,events,metrics,all)HOJICHA_METRICS: Enable metrics collection (1, true, yes)HOJICHA_DEBUG_FORMAT: Output format (text, json, compact)
Sourcepub fn full_debug() -> Self
pub fn full_debug() -> Self
Create a configuration with all debugging enabled
Sourcepub fn with_debugging(self, enabled: bool) -> Self
pub fn with_debugging(self, enabled: bool) -> Self
Builder method to enable debugging
Sourcepub fn with_trace_level(self, level: TraceLevel) -> Self
pub fn with_trace_level(self, level: TraceLevel) -> Self
Builder method to set trace level
Sourcepub fn with_metrics(self, enabled: bool) -> Self
pub fn with_metrics(self, enabled: bool) -> Self
Builder method to enable metrics
Sourcepub fn with_format(self, format: OutputFormat) -> Self
pub fn with_format(self, format: OutputFormat) -> Self
Builder method to set output format
Trait Implementations§
Source§impl Clone for DebugConfig
impl Clone for DebugConfig
Source§fn clone(&self) -> DebugConfig
fn clone(&self) -> DebugConfig
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 DebugConfig
impl Debug for DebugConfig
Auto Trait Implementations§
impl Freeze for DebugConfig
impl RefUnwindSafe for DebugConfig
impl Send for DebugConfig
impl Sync for DebugConfig
impl Unpin for DebugConfig
impl UnsafeUnpin for DebugConfig
impl UnwindSafe for DebugConfig
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