pub trait ContextAdapter: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn produce<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 ContextInput,
) -> Pin<Box<dyn Future<Output = ContextResult<Vec<Message>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Pluggable context source that produces message fragments.
Required Methods§
Sourcefn produce<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 ContextInput,
) -> Pin<Box<dyn Future<Output = ContextResult<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn produce<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 ContextInput,
) -> Pin<Box<dyn Future<Output = ContextResult<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Produces message fragments for the given input.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".