pub struct ResourceTraceEnvelope {
pub version: u32,
pub resource: String,
pub operation: String,
pub trace_kind: String,
pub input_summary: Value,
pub output_summary: Value,
pub reason: Option<String>,
pub metadata: Value,
}Expand description
Machine-readable trace envelope for resource-side decisions.
This is intentionally local to rig-resources. It proves a stable shape
for graph, security, baseline, and memory-resource metadata before any
trace API is promoted into the rig-compose kernel.
Fields§
§version: u32Trace shape version.
resource: StringCategory such as graph, security, baseline, or memory.
operation: StringSpecific operation performed by the resource.
trace_kind: StringMachine-readable trace kind such as graph_expansion.
input_summary: ValueCompact, non-secret input summary.
output_summary: ValueCompact output summary.
reason: Option<String>Optional reason code for skip, suppress, deny, or not-applicable paths.
metadata: ValueAdditional resource-specific metadata.
Implementations§
Source§impl ResourceTraceEnvelope
impl ResourceTraceEnvelope
Sourcepub fn new(
resource: impl Into<String>,
operation: impl Into<String>,
trace_kind: impl Into<String>,
) -> Self
pub fn new( resource: impl Into<String>, operation: impl Into<String>, trace_kind: impl Into<String>, ) -> Self
Create a trace envelope with empty summaries.
Sourcepub fn with_input_summary(self, input_summary: Value) -> Self
pub fn with_input_summary(self, input_summary: Value) -> Self
Attach the input summary.
Sourcepub fn with_output_summary(self, output_summary: Value) -> Self
pub fn with_output_summary(self, output_summary: Value) -> Self
Attach the output summary.
Sourcepub fn with_reason(self, reason: impl Into<String>) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
Attach a machine-readable reason code.
Sourcepub fn with_metadata(self, metadata: Value) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Attach resource-specific metadata.
Trait Implementations§
Source§impl Clone for ResourceTraceEnvelope
impl Clone for ResourceTraceEnvelope
Source§fn clone(&self) -> ResourceTraceEnvelope
fn clone(&self) -> ResourceTraceEnvelope
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 ResourceTraceEnvelope
impl Debug for ResourceTraceEnvelope
Source§impl<'de> Deserialize<'de> for ResourceTraceEnvelope
impl<'de> Deserialize<'de> for ResourceTraceEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ResourceTraceEnvelope
impl PartialEq for ResourceTraceEnvelope
Source§fn eq(&self, other: &ResourceTraceEnvelope) -> bool
fn eq(&self, other: &ResourceTraceEnvelope) -> bool
self and other values to be equal, and is used by ==.