pub trait ContextTranslationStrategy: Send + Sync {
// Required method
fn translate_for_provider(
&self,
messages: &[Message],
target: ApiProtocol,
) -> Vec<Message>;
}Expand description
Translates canonical Messages for consumption by a specific target provider.
This is a read-only operation: it produces a temporary copy of the messages with provider-incompatible content translated or removed. The original messages are never modified.
Required Methods§
Sourcefn translate_for_provider(
&self,
messages: &[Message],
target: ApiProtocol,
) -> Vec<Message>
fn translate_for_provider( &self, messages: &[Message], target: ApiProtocol, ) -> Vec<Message>
Translate a slice of messages for the given target provider protocol.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".