pub trait OutputSpillSink:
Send
+ Sync
+ Debug {
// Required method
fn spill(
&self,
ctx: &SpillContext<'_>,
full: &str,
) -> Result<SpillRef, SpillError>;
}Expand description
Pluggable sink for retaining full un-truncated tool output observations.
Implementations may store output in memory, write to an artifact store,
or upload to a remote recall cache. When configured on a crate::TruncationPolicy,
output exceeding max_bytes is first saved via OutputSpillSink::spill
before middle-out truncation occurs.
Required Methods§
Sourcefn spill(
&self,
ctx: &SpillContext<'_>,
full: &str,
) -> Result<SpillRef, SpillError>
fn spill( &self, ctx: &SpillContext<'_>, full: &str, ) -> Result<SpillRef, SpillError>
Spill the full tool return content, returning a recallable SpillRef.
§Errors
Returns SpillError if storage fails, capacity is exceeded, or the
operation is rejected.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".