HttpInterceptor

Trait HttpInterceptor 

Source
pub trait HttpInterceptor: Send + Sync {
    // Provided methods
    fn fail<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _status: u16,
        _data: &'life1 Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn request<'life0, 'async_trait>(
        &'life0 self,
        req: RequestBuilder,
    ) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn response<'life0, 'async_trait>(
        &'life0 self,
        data: Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_done<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _stats: &'life1 HttpStats,
        _err: Option<&'life2 Error>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

HTTP interceptor trait for request/response modification and monitoring

Provided Methods§

Source

fn fail<'life0, 'life1, 'async_trait>( &'life0 self, _status: u16, _data: &'life1 Bytes, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

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

Source

fn on_done<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _stats: &'life1 HttpStats, _err: Option<&'life2 Error>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§