pub trait ModuleHandlers {
// Required method
fn request_handler<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
request: Request<BoxBody<Bytes, Error>>,
config: &'life1 ServerConfiguration,
socket_data: &'life2 SocketData,
error_logger: &'life3 ErrorLogger,
) -> Pin<Box<dyn Future<Output = Result<ResponseData, Box<dyn Error + Send + Sync>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn response_modifying_handler<'life0, 'async_trait>(
&'life0 mut self,
response: Response<BoxBody<Bytes, Error>>,
) -> Pin<Box<dyn Future<Output = Result<Response<BoxBody<Bytes, Error>>, Box<dyn Error>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
A trait that defines handlers for a module
Required Methods§
Sourcefn request_handler<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
request: Request<BoxBody<Bytes, Error>>,
config: &'life1 ServerConfiguration,
socket_data: &'life2 SocketData,
error_logger: &'life3 ErrorLogger,
) -> Pin<Box<dyn Future<Output = Result<ResponseData, Box<dyn Error + Send + Sync>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn request_handler<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
request: Request<BoxBody<Bytes, Error>>,
config: &'life1 ServerConfiguration,
socket_data: &'life2 SocketData,
error_logger: &'life3 ErrorLogger,
) -> Pin<Box<dyn Future<Output = Result<ResponseData, Box<dyn Error + Send + Sync>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Handles the incoming request
Provided Methods§
Sourcefn response_modifying_handler<'life0, 'async_trait>(
&'life0 mut self,
response: Response<BoxBody<Bytes, Error>>,
) -> Pin<Box<dyn Future<Output = Result<Response<BoxBody<Bytes, Error>>, Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn response_modifying_handler<'life0, 'async_trait>(
&'life0 mut self,
response: Response<BoxBody<Bytes, Error>>,
) -> Pin<Box<dyn Future<Output = Result<Response<BoxBody<Bytes, Error>>, Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Modifies the outgoing response