pub struct LocalValue {
pub id: u64,
pub name: String,
pub type_name: String,
pub value: String,
pub kind: LocalKind,
pub source: SourceLocation,
pub frame_id: Option<u64>,
pub observation: Observation,
}Expand description
A value captured or inferred for a single invocation. 单次调用中捕获或推断的值。
observation is Unobserved for MIR-only locals. Such values describe a
possible binding and never claim that a runtime value was seen.
observation 为 Unobserved 时表示仅由 MIR 推断,不能当作运行时实值。
Fields§
§id: u64The trace-local id; equal ids mean the same captured value. 追踪内的局部 id;id 相等即同一个已捕获值。
name: StringThe name used in output, function::name for inferred locals.
输出中使用的名称;推断局部值为 function::name。
type_name: StringThe rendered type name reported by the recorder. 记录方给出的渲染后类型名。
value: StringThe rendered value, <not observed> for MIR-only locals.
渲染后的值;仅由 MIR 得出的局部值为 <not observed>。
kind: LocalKindThe role this value plays in its invocation. 该值在其调用中扮演的角色。
source: SourceLocationWhere the value was recorded or inferred. 该值被记录或推断的位置。
frame_id: Option<u64>The enclosing frame, None when recorded outside every traced call.
所属调用帧;在任何被追踪调用之外记录时为 None。
observation: ObservationWhether the value was observed at runtime or inferred statically. 该值是运行时观测到的还是静态推断出来的。
Trait Implementations§
Source§impl Clone for LocalValue
impl Clone for LocalValue
Source§fn clone(&self) -> LocalValue
fn clone(&self) -> LocalValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocalValue
impl Debug for LocalValue
impl Eq for LocalValue
Source§impl PartialEq for LocalValue
impl PartialEq for LocalValue
impl StructuralPartialEq for LocalValue
Auto Trait Implementations§
impl Freeze for LocalValue
impl RefUnwindSafe for LocalValue
impl Send for LocalValue
impl Sync for LocalValue
impl Unpin for LocalValue
impl UnsafeUnpin for LocalValue
impl UnwindSafe for LocalValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.