Skip to main content

ShadowOutcomeSource

Trait ShadowOutcomeSource 

Source
pub trait ShadowOutcomeSource:
    Send
    + Sync
    + Debug {
    // Required method
    fn serve(&self, kind: &str, recorded_request: &Value) -> Option<Value>;
}
Expand description

The recorded world a shadow serves refused effects from (R0.12 wave 4). Implemented over a source run’s journal (crate::replay::JournalShadowSource); the kernel owns the boundary, the journal owns the evidence.

recorded_request is the request payload in the recorded shape the journal holds (for tools, crate::replay::tool_call_request) — the caller builds it from the live call so the source can match name and arguments, not merely the effect kind.

Required Methods§

Source

fn serve(&self, kind: &str, recorded_request: &Value) -> Option<Value>

The recorded outcome of one refused call, when the source run recorded it. None is a divergence, not an error: the candidate attempted something the recorded world never saw.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§