Trait Http1StreamEncoder

Source
pub trait Http1StreamEncoder<S, SLEEP, H>
where S: AsyncWrite + Unpin, SLEEP: Sleepble, H: Head,
{ // Required methods fn write_head<'life0, 'life1, 'async_trait>( &'life0 mut self, stream: &'life1 mut S, head: H, body_framing: BodyFraming, ) -> Pin<Box<dyn Future<Output = Result<(), IoError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn write_body<'life0, 'life1, 'async_trait>( &'life0 mut self, stream: &'life1 mut S, body: EncoderBody, ) -> Pin<Box<dyn Future<Output = Result<(), IoError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_write_timeout(&mut self, dur: Duration); }

Required Methods§

Source

fn write_head<'life0, 'life1, 'async_trait>( &'life0 mut self, stream: &'life1 mut S, head: H, body_framing: BodyFraming, ) -> Pin<Box<dyn Future<Output = Result<(), IoError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn write_body<'life0, 'life1, 'async_trait>( &'life0 mut self, stream: &'life1 mut S, body: EncoderBody, ) -> Pin<Box<dyn Future<Output = Result<(), IoError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn set_write_timeout(&mut self, dur: Duration)

Implementors§

Source§

impl<S, SLEEP> Http1StreamEncoder<S, SLEEP, (Response<()>, Option<Vec<u8>>)> for Http1ResponseEncoder
where S: AsyncWrite + Unpin + Send, SLEEP: Sleepble,

Source§

impl<S, SLEEP> Http1StreamEncoder<S, SLEEP, Request<()>> for Http1RequestEncoder
where S: AsyncWrite + Unpin + Send, SLEEP: Sleepble,