ToWire

Trait ToWire 

Source
pub trait ToWire {
    // Required method
    fn to_bytes(self) -> impl Future<Output = Result<Bytes, WireError>> + Send;
}

Required Methods§

Source

fn to_bytes(self) -> impl Future<Output = Result<Bytes, WireError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<B> ToWire for Request<B>
where B: BodyExt + Send + 'static, B::Data: Send, B::Error: Into<Box<dyn Error + Send + Sync>>,

Source§

impl<B> ToWire for Response<B>
where B: Body + Clone + Send + Sync + 'static, B::Error: Error + Send + Sync + 'static, B::Data: Send + Sync + 'static,

Implementors§