pub struct TraceInfo {
pub message: Cow<'static, str>,
pub location: Option<Location>,
}Expand description
A trace entry that can include location information.
Fields§
§message: Cow<'static, str>The trace message
location: Option<Location>Optional location where the trace was added
Implementations§
Source§impl TraceInfo
impl TraceInfo
Sourcepub fn new(message: impl Into<Cow<'static, str>>) -> Self
pub fn new(message: impl Into<Cow<'static, str>>) -> Self
Creates a new context with just a message.
Sourcepub fn detailed(
message: impl Into<Cow<'static, str>>,
file: &'static str,
line: u32,
) -> Self
pub fn detailed( message: impl Into<Cow<'static, str>>, file: &'static str, line: u32, ) -> Self
Creates a new context with message, file, and line information.
Sourcepub const fn has_location(&self) -> bool
pub const fn has_location(&self) -> bool
Returns true if this context has location information.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraceInfo
impl RefUnwindSafe for TraceInfo
impl Send for TraceInfo
impl Sync for TraceInfo
impl Unpin for TraceInfo
impl UnwindSafe for TraceInfo
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