pub trait RequestHandler: Send {
// Required methods
fn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn protocol_config(&self) -> ProtocolConfig;
fn protocol_name(&self) -> &'static str;
fn clone_box(&self) -> Box<dyn RequestHandler>;
}
Expand description
Defines a handler for the request-response protocol factory.
Required Methods§
sourcefn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs the underlying protocol handler.
sourcefn protocol_config(&self) -> ProtocolConfig
fn protocol_config(&self) -> ProtocolConfig
Returns a config for the request-response protocol factory.
sourcefn protocol_name(&self) -> &'static str
fn protocol_name(&self) -> &'static str
Returns a protocol name.
sourcefn clone_box(&self) -> Box<dyn RequestHandler>
fn clone_box(&self) -> Box<dyn RequestHandler>
Clone boxed value.