Skip to main content

TraceFrame

Struct TraceFrame 

Source
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: u64

The trace-local frame id. 追踪内的帧 id。

§parent: Option<u64>

The enclosing frame id, None for a root frame. 外层调用帧 id;根帧为 None。

§node: NodeId

The registry node the frame belongs to. 该帧所属的注册机节点。

§function: &'static str

The 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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TraceFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TraceFrame

Source§

impl PartialEq for TraceFrame

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TraceFrame

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.