pub trait ContextTransformer: Send + Sync {
// Required method
fn transform<'a>(
&'a self,
context: &'a Context,
model: &'a Model,
) -> Pin<Box<dyn Future<Output = Context> + Send + 'a>>;
}Expand description
Context transformer — applied before provider stream call.
Used by snapcompact inline imaging to replace large tool results with PNG frames, reducing token usage on vision-capable models.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".