pub trait CompactionBackend: Send + Sync {
// Required method
fn compact<'a>(
&'a self,
prompt: String,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>>;
// Provided method
fn classify_failure(&self, error: &Error) -> CompactionFailure { ... }
}Required Methods§
fn compact<'a>( &'a self, prompt: String, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>>
Provided Methods§
Sourcefn classify_failure(&self, error: &Error) -> CompactionFailure
fn classify_failure(&self, error: &Error) -> CompactionFailure
What a failed request means for the rest of the compaction. Backends that carry a typed error should override this; the default reads the provider text an ACP harness passes through.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".