Skip to main content

RuntimeLifecycleHooks

Trait RuntimeLifecycleHooks 

Source
pub trait RuntimeLifecycleHooks<C>: Send + Sync {
    // Provided methods
    fn before_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        _tool: &'life1 ToolDescriptor,
        _request: &'life2 ToolCallRequest,
        _context: &'life3 C,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
    fn after_call<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        _tool: &'life1 ToolDescriptor,
        _request: &'life2 ToolCallRequest,
        _outcome: Result<&'life3 ToolCallResult, &'life4 NexaraError>,
        _context: &'life5 C,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait { ... }
}

Provided Methods§

Source

fn before_call<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _tool: &'life1 ToolDescriptor, _request: &'life2 ToolCallRequest, _context: &'life3 C, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn after_call<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, _tool: &'life1 ToolDescriptor, _request: &'life2 ToolCallRequest, _outcome: Result<&'life3 ToolCallResult, &'life4 NexaraError>, _context: &'life5 C, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§