Skip to main content

ContextPreparer

Trait ContextPreparer 

Source
pub trait ContextPreparer: Send + Sync {
    // Required method
    fn prepare<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        context: &'life1 mut Context,
        round: &'life2 RoundInfo<'life3>,
        control: &'life4 CallControl,
    ) -> Pin<Box<dyn Future<Output = Result<ContextFrame, PrepareError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
}
Expand description

Prepares an independent request frame with exclusive access to context.

Each context edit commits independently; edits already committed remain if preparation subsequently fails. The returned frame is not written back to context. Input consumption and recovery belong to the implementation.

Required Methods§

Source

fn prepare<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, context: &'life1 mut Context, round: &'life2 RoundInfo<'life3>, control: &'life4 CallControl, ) -> Pin<Box<dyn Future<Output = Result<ContextFrame, PrepareError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Selects and optionally edits material using actual invocation settings.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§