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. 该值是运行时观测到的还是静态推断出来的。