pub struct EvidenceTrace {
pub inputs: Vec<EvidenceRef>,
pub rationale: String,
}Expand description
The evidence + rationale behind a tool’s decision.
Fields§
§inputs: Vec<EvidenceRef>§rationale: StringImplementations§
Source§impl EvidenceTrace
impl EvidenceTrace
pub fn new(rationale: impl Into<String>, inputs: Vec<EvidenceRef>) -> Self
Sourcepub fn attach(self, ret: ToolReturn) -> ToolReturn
pub fn attach(self, ret: ToolReturn) -> ToolReturn
Attach this trace to a ToolReturn, moving plain Content into
a ContentAndArtifact whose artifact carries the trace. Command
returns are passed through unchanged (no content to annotate).
Sourcepub fn extract(ret: &ToolReturn) -> Option<EvidenceTrace>
pub fn extract(ret: &ToolReturn) -> Option<EvidenceTrace>
Extract a trace from a ToolReturn, if present.
Trait Implementations§
Source§impl Clone for EvidenceTrace
impl Clone for EvidenceTrace
Source§fn clone(&self) -> EvidenceTrace
fn clone(&self) -> EvidenceTrace
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 EvidenceTrace
impl Debug for EvidenceTrace
Source§impl<'de> Deserialize<'de> for EvidenceTrace
impl<'de> Deserialize<'de> for EvidenceTrace
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
impl Eq for EvidenceTrace
Source§impl PartialEq for EvidenceTrace
impl PartialEq for EvidenceTrace
Source§fn eq(&self, other: &EvidenceTrace) -> bool
fn eq(&self, other: &EvidenceTrace) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EvidenceTrace
impl Serialize for EvidenceTrace
impl StructuralPartialEq for EvidenceTrace
Auto Trait Implementations§
impl Freeze for EvidenceTrace
impl RefUnwindSafe for EvidenceTrace
impl Send for EvidenceTrace
impl Sync for EvidenceTrace
impl Unpin for EvidenceTrace
impl UnsafeUnpin for EvidenceTrace
impl UnwindSafe for EvidenceTrace
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