Trait SamplingHandler

Source
pub trait SamplingHandler: Send + Sync {
    // Required methods
    fn handle_request<'life0, 'async_trait>(
        &'life0 self,
        request: SamplingRequest,
    ) -> Pin<Box<dyn Future<Output = Result<SamplingResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cancel<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Sampling handler trait

Required Methods§

Source

fn handle_request<'life0, 'async_trait>( &'life0 self, request: SamplingRequest, ) -> Pin<Box<dyn Future<Output = Result<SamplingResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handles a sampling request

Source

fn cancel<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cancels an ongoing sampling operation

Implementors§