pub struct ConsoleMessage { /* private fields */ }Expand description
Implementations§
Source§impl ConsoleMessage
impl ConsoleMessage
Sourcepub fn type_(&self) -> ConsoleMessageType
pub fn type_(&self) -> ConsoleMessageType
Get the message type.
Returns the type of console call (log, error, warn, etc.).
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
Get the formatted message text.
This combines all arguments into a single string, similar to how the browser console would display them.
Sourcepub fn args(&self) -> Vec<JsArg>
pub fn args(&self) -> Vec<JsArg>
Get the raw message arguments.
These are the arguments passed to the console method as JS handles.
Use text() for a formatted string representation.
Sourcepub fn location(&self) -> Option<ConsoleMessageLocation>
pub fn location(&self) -> Option<ConsoleMessageLocation>
Get the source location of the console call.
Returns None if no stack trace is available.
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 moreAuto Trait Implementations§
impl Freeze for ConsoleMessage
impl !RefUnwindSafe for ConsoleMessage
impl Send for ConsoleMessage
impl Sync for ConsoleMessage
impl Unpin 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