pub trait LoopRecorder: Send + Sync {
// Required method
fn record(&self, event: &LoopEvent) -> Result<()>;
// Provided methods
fn external_intent(&self, _key: &str, _intent: &Value) -> Result<()> { ... }
fn external_result(&self, _key: &str, _result: &Value) -> Result<()> { ... }
fn record_artifact(
&self,
content: &[u8],
_media_type: &str,
) -> Result<String> { ... }
fn fetch_artifact(&self, _handle: &str) -> Result<Option<Vec<u8>>> { ... }
}Expand description
Synchronous write-ahead event sink. Implementations must durably append before returning; the loop records observations before inspecting them.
Required Methods§
Provided Methods§
Sourcefn external_intent(&self, _key: &str, _intent: &Value) -> Result<()>
fn external_intent(&self, _key: &str, _intent: &Value) -> Result<()>
Write-ahead bracketing for durable external effects (system 13): the intent is recorded before the effect runs and the result after, so an interrupted run shows the open bracket. Defaults are no-ops for in-memory conformance fixtures.