pub struct EvidenceBundle {
pub scope: EvaluationScope,
pub items: Vec<EvidenceItem>,
pub outcome_ref: Option<EntityRef>,
pub redacted_summary: String,
pub policy_refs: Vec<PolicyRef>,
pub privacy_class: PrivacyClass,
pub retention_class: RetentionClass,
}Expand description
Evidence supplied to an evaluator.
Fields§
§scope: EvaluationScopeScope this bundle covers.
items: Vec<EvidenceItem>Evidence refs available for cited support.
outcome_ref: Option<EntityRef>Optional outcome ref being evaluated.
redacted_summary: StringBounded bundle summary safe for prompts and logs.
policy_refs: Vec<PolicyRef>Policy refs that governed this evidence projection.
privacy_class: PrivacyClassPrivacy class for the bundle.
retention_class: RetentionClassRetention class for the bundle.
Implementations§
Source§impl EvidenceBundle
impl EvidenceBundle
Sourcepub fn new(scope: EvaluationScope, redacted_summary: impl Into<String>) -> Self
pub fn new(scope: EvaluationScope, redacted_summary: impl Into<String>) -> Self
Creates an empty evidence bundle.
Sourcepub fn from_turn_trace(trace: &TurnTrace) -> Result<Self, AgentError>
pub fn from_turn_trace(trace: &TurnTrace) -> Result<Self, AgentError>
Builds an evidence bundle from a core turn trace.
Sourcepub fn from_run_trace(trace: &RunTrace) -> Result<Self, AgentError>
pub fn from_run_trace(trace: &RunTrace) -> Result<Self, AgentError>
Builds an evidence bundle from a core run trace.
Sourcepub fn from_session_timeline(
timeline: &SessionTimeline,
) -> Result<Self, AgentError>
pub fn from_session_timeline( timeline: &SessionTimeline, ) -> Result<Self, AgentError>
Builds an evidence bundle from a core session timeline.
Sourcepub fn with_item(self, item: EvidenceItem) -> Self
pub fn with_item(self, item: EvidenceItem) -> Self
Returns this bundle with an item appended, deduped by entity ref.
Sourcepub fn validate_support_refs(
&self,
support_refs: impl IntoIterator<Item = EntityRef>,
max_support_refs: usize,
) -> SupportRefValidation
pub fn validate_support_refs( &self, support_refs: impl IntoIterator<Item = EntityRef>, max_support_refs: usize, ) -> SupportRefValidation
Validates cited support refs against this bundle.
Trait Implementations§
Source§impl Clone for EvidenceBundle
impl Clone for EvidenceBundle
Source§fn clone(&self) -> EvidenceBundle
fn clone(&self) -> EvidenceBundle
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 EvidenceBundle
impl Debug for EvidenceBundle
Source§impl<'de> Deserialize<'de> for EvidenceBundle
impl<'de> Deserialize<'de> for EvidenceBundle
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 EvidenceBundle
impl PartialEq for EvidenceBundle
Source§fn eq(&self, other: &EvidenceBundle) -> bool
fn eq(&self, other: &EvidenceBundle) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EvidenceBundle
impl Serialize for EvidenceBundle
impl Eq for EvidenceBundle
impl StructuralPartialEq for EvidenceBundle
Auto Trait Implementations§
impl Freeze for EvidenceBundle
impl RefUnwindSafe for EvidenceBundle
impl Send for EvidenceBundle
impl Sync for EvidenceBundle
impl Unpin for EvidenceBundle
impl UnsafeUnpin for EvidenceBundle
impl UnwindSafe for EvidenceBundle
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