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§

source

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.

source

fn protocol_config(&self) -> ProtocolConfig

Returns a config for the request-response protocol factory.

source

fn protocol_name(&self) -> &'static str

Returns a protocol name.

source

fn clone_box(&self) -> Box<dyn RequestHandler>

Clone boxed value.

Trait Implementations§

source§

impl Clone for Box<dyn RequestHandler>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§