pub struct ShadowRecord {
pub tool_name: String,
pub args: Vec<Value>,
pub kwargs: Map<String, Value>,
pub ts: f64,
pub returned: Value,
}Expand description
One recorded would-be tool call.
Fields§
§tool_name: String§args: Vec<Value>Positional args passed to the tool (serialized as JSON array items).
kwargs: Map<String, Value>Keyword args passed to the tool.
ts: f64Unix timestamp when the call was intercepted.
returned: ValueThe value that was returned in shadow mode (the placeholder).
Implementations§
Source§impl ShadowRecord
impl ShadowRecord
Sourcepub fn to_json_line(&self) -> String
pub fn to_json_line(&self) -> String
Serialize to a single-line JSON string for JSONL output.
Sourcepub fn from_json_line(line: &str) -> Option<Self>
pub fn from_json_line(line: &str) -> Option<Self>
Deserialize from a JSONL line.
Trait Implementations§
Source§impl Clone for ShadowRecord
impl Clone for ShadowRecord
Source§fn clone(&self) -> ShadowRecord
fn clone(&self) -> ShadowRecord
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 moreAuto Trait Implementations§
impl Freeze for ShadowRecord
impl RefUnwindSafe for ShadowRecord
impl Send for ShadowRecord
impl Sync for ShadowRecord
impl Unpin for ShadowRecord
impl UnsafeUnpin for ShadowRecord
impl UnwindSafe for ShadowRecord
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