pub trait HttpModule {
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
// Provided methods
fn request_header_filter<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_req: &'life1 mut RequestHeader,
) -> Pin<Box<dyn Future<Output = Result<(), Box<Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait { ... }
fn request_body_filter<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_body: &'life1 mut Option<Bytes>,
_end_of_stream: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait { ... }
fn response_header_filter<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_resp: &'life1 mut ResponseHeader,
_end_of_stream: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait { ... }
fn response_body_filter(
&mut self,
_body: &mut Option<Bytes>,
_end_of_stream: bool,
) -> Result<(), Box<Error>> { ... }
fn response_trailer_filter(
&mut self,
_trailers: &mut Option<Box<HeaderMap>>,
) -> Result<Option<Bytes>, Box<Error>> { ... }
fn response_done_filter(&mut self) -> Result<Option<Bytes>, Box<Error>> { ... }
}Expand description
The trait an HTTP traffic module needs to implement