pub struct ConsoleMessage {
pub severity: ConsoleSeverity,
pub text: String,
pub source: String,
pub line: u32,
pub column: u32,
pub timestamp: f64,
pub stack_trace: Option<String>,
}Expand description
Captured console message with full context
Fields§
§severity: ConsoleSeveritySeverity level
text: StringMessage text
source: StringSource file (if available)
line: u32Line number (if available)
column: u32Column number (if available)
timestamp: f64Timestamp (relative to page load)
stack_trace: Option<String>Stack trace (if available)
Implementations§
Source§impl ConsoleMessage
impl ConsoleMessage
Sourcepub fn new(severity: ConsoleSeverity, text: impl Into<String>) -> Self
pub fn new(severity: ConsoleSeverity, text: impl Into<String>) -> Self
Create a new console message
Sourcepub fn with_source(
self,
source: impl Into<String>,
line: u32,
column: u32,
) -> Self
pub fn with_source( self, source: impl Into<String>, line: u32, column: u32, ) -> Self
Set source location
Sourcepub fn with_timestamp(self, timestamp: f64) -> Self
pub fn with_timestamp(self, timestamp: f64) -> Self
Set timestamp
Sourcepub fn with_stack_trace(self, stack_trace: impl Into<String>) -> Self
pub fn with_stack_trace(self, stack_trace: impl Into<String>) -> Self
Set stack trace
Trait Implementations§
Source§impl Clone for ConsoleMessage
impl Clone for ConsoleMessage
Source§fn clone(&self) -> ConsoleMessage
fn clone(&self) -> ConsoleMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 ConsoleMessage
impl Debug for ConsoleMessage
Auto Trait Implementations§
impl Freeze for ConsoleMessage
impl RefUnwindSafe for ConsoleMessage
impl Send for ConsoleMessage
impl Sync for ConsoleMessage
impl Unpin for ConsoleMessage
impl UnsafeUnpin for ConsoleMessage
impl UnwindSafe for ConsoleMessage
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