Trait ResponseWriter

Source
pub trait ResponseWriter: Send + Sync {
    // Required method
    fn write<'life0, 'async_trait>(
        &'life0 mut self,
        res: Response,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait to write a response.

Describes how a response should be sent by a server.

Required Methods§

Source

fn write<'life0, 'async_trait>( &'life0 mut self, res: Response, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write the given response.

Implementors§

Source§

impl ResponseWriter for TcpHandler

Available on crate features tcp-binder and server only.