pub struct TraceFrame {
pub frame_id: u64,
pub parent: Option<u64>,
pub node: NodeId,
pub function: &'static str,
pub source: Option<SourceLocation>,
}Expand description
One recorded frame, flattened for text. 一个已记录调用帧的文本平铺形式。
function and source are interned while a document is parsed, so repeated
frames share one string per distinct name instead of leaking one per record.
function 与 source 在解析文档时被驻留,因此重复帧对每个不同名字只共享一个字符串,
而不是每条记录泄漏一个。
Fields§
§frame_id: u64The trace-local frame id. 追踪内的帧 id。
parent: Option<u64>The enclosing frame id, None for a root frame.
外层调用帧 id;根帧为 None。
node: NodeIdThe registry node the frame belongs to. 该帧所属的注册机节点。
function: &'static strThe logical function active in the frame. 该帧中处于活动状态的逻辑函数名。
source: Option<SourceLocation>The callsite that entered the frame, when one is known. 进入该帧的调用点(若可知)。
Trait Implementations§
Source§impl Clone for TraceFrame
impl Clone for TraceFrame
Source§impl Debug for TraceFrame
impl Debug for TraceFrame
impl Eq for TraceFrame
Source§impl PartialEq for TraceFrame
impl PartialEq for TraceFrame
impl StructuralPartialEq for TraceFrame
Auto Trait Implementations§
impl Freeze for TraceFrame
impl RefUnwindSafe for TraceFrame
impl Send for TraceFrame
impl Sync for TraceFrame
impl Unpin for TraceFrame
impl UnsafeUnpin for TraceFrame
impl UnwindSafe for TraceFrame
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