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§
Sourcefn 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 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