Skip to main content

Compactor

Trait Compactor 

Source
pub trait Compactor: Send + Sync {
    // Required method
    fn summarize<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        model: &'life1 str,
        messages: &'life2 [ChatMessage],
        operation_id: &'life3 str,
        cancellation: CancellationToken,
        deadline: Instant,
    ) -> Pin<Box<dyn Future<Output = Result<CompactionResult, RuntimeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;

    // Provided method
    fn name(&self) -> &str { ... }
}

Required Methods§

Source

fn summarize<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, model: &'life1 str, messages: &'life2 [ChatMessage], operation_id: &'life3 str, cancellation: CancellationToken, deadline: Instant, ) -> Pin<Box<dyn Future<Output = Result<CompactionResult, RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Provided Methods§

Source

fn name(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§