pub struct TraceEntry {
pub timestamp: Instant,
pub level: TraceLevel,
pub category: String,
pub label: Option<String>,
pub values: Vec<Value>,
pub location: Option<String>,
}Expand description
结构化 TRACE 事件条目
Fields§
§timestamp: Instant时间戳
level: TraceLevel事件级别
category: String事件类型/类别
label: Option<String>标签
values: Vec<Value>追踪的值(保留原始值)
location: Option<String>源代码位置(文件名:行号)
Implementations§
Source§impl TraceEntry
impl TraceEntry
Sourcepub fn with_label(self, label: String) -> Self
pub fn with_label(self, label: String) -> Self
设置标签
Sourcepub fn with_location(self, location: String) -> Self
pub fn with_location(self, location: String) -> Self
设置位置
Trait Implementations§
Source§impl Clone for TraceEntry
impl Clone for TraceEntry
Source§fn clone(&self) -> TraceEntry
fn clone(&self) -> TraceEntry
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 TraceEntry
impl !RefUnwindSafe for TraceEntry
impl !Send for TraceEntry
impl !Sync for TraceEntry
impl Unpin for TraceEntry
impl !UnwindSafe for TraceEntry
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