pub struct TraceEvent {
pub level: TraceLevel,
pub message: String,
pub expr: Option<Expr>,
pub location: String,
pub category: Option<TraceCategory>,
pub depth: u32,
}Expand description
A single trace event during type checking or elaboration.
Fields§
§level: TraceLevelSeverity / verbosity level.
message: StringHuman-readable message.
expr: Option<Expr>Expression associated with this event.
location: StringLocation string.
category: Option<TraceCategory>Category.
depth: u32Depth in the type-checking stack.
Implementations§
Source§impl TraceEvent
impl TraceEvent
Sourcepub fn new(level: TraceLevel, message: String) -> Self
pub fn new(level: TraceLevel, message: String) -> Self
Create a minimal trace event.
Sourcepub fn with_location(self, location: impl Into<String>) -> Self
pub fn with_location(self, location: impl Into<String>) -> Self
Set the location.
Sourcepub fn with_category(self, category: TraceCategory) -> Self
pub fn with_category(self, category: TraceCategory) -> Self
Set the category.
Sourcepub fn with_depth(self, depth: u32) -> Self
pub fn with_depth(self, depth: u32) -> Self
Set the depth.
Trait Implementations§
Source§impl Clone for TraceEvent
impl Clone for TraceEvent
Auto Trait Implementations§
impl !Send for TraceEvent
impl !Sync for TraceEvent
impl Forget for TraceEvent
impl Freeze for TraceEvent
impl Move for TraceEvent
impl RefUnwindSafe for TraceEvent
impl Unpin for TraceEvent
impl UnsafeUnpin for TraceEvent
impl UnwindSafe for TraceEvent
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