pub struct PolicyTraceRecord {Show 15 fields
pub run_id: Option<String>,
pub workflow_id: Option<String>,
pub turn: Option<u32>,
pub tool_call_id: Option<String>,
pub tool_name: String,
pub action_kind: ToolActionKind,
pub decision: ToolPolicyDecision,
pub args_hash: Option<String>,
pub resource_scope: ResourceScope,
pub autonomy_mode: AutonomyMode,
pub workflow_type: WorkflowType,
pub risk_level: RiskLevel,
pub trust_scope: TrustScopeContext,
pub trust_labels: Vec<String>,
pub details: Value,
}Expand description
Serializable policy record suitable for trace/evidence pipelines.
Fields§
§run_id: Option<String>§workflow_id: Option<String>§turn: Option<u32>§tool_call_id: Option<String>§tool_name: String§action_kind: ToolActionKind§decision: ToolPolicyDecision§args_hash: Option<String>§resource_scope: ResourceScope§autonomy_mode: AutonomyMode§workflow_type: WorkflowType§risk_level: RiskLevel§trust_scope: TrustScopeContext§trust_labels: Vec<String>§details: ValueImplementations§
Source§impl PolicyTraceRecord
impl PolicyTraceRecord
pub fn from_context( context: &ToolPolicyContext, decision: ToolPolicyDecision, ) -> Self
pub fn to_trace_event(&self, run_id: impl Into<String>) -> TraceEvent
Trait Implementations§
Source§impl Clone for PolicyTraceRecord
impl Clone for PolicyTraceRecord
Source§fn clone(&self) -> PolicyTraceRecord
fn clone(&self) -> PolicyTraceRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolicyTraceRecord
impl Debug for PolicyTraceRecord
Source§impl<'de> Deserialize<'de> for PolicyTraceRecord
impl<'de> Deserialize<'de> for PolicyTraceRecord
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PolicyTraceRecord
impl PartialEq for PolicyTraceRecord
Source§fn eq(&self, other: &PolicyTraceRecord) -> bool
fn eq(&self, other: &PolicyTraceRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PolicyTraceRecord
impl Serialize for PolicyTraceRecord
impl StructuralPartialEq for PolicyTraceRecord
Auto Trait Implementations§
impl Freeze for PolicyTraceRecord
impl RefUnwindSafe for PolicyTraceRecord
impl Send for PolicyTraceRecord
impl Sync for PolicyTraceRecord
impl Unpin for PolicyTraceRecord
impl UnsafeUnpin for PolicyTraceRecord
impl UnwindSafe for PolicyTraceRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more