pub trait Transport: Any + AsyncRead + AsyncWrite + Send + Sync + Unpin {
    fn as_box_any(self: Box<Self>) -> Box<dyn Any>;
}
Expand description

The interface that the http protocol is communicated over.

Transport represents any type that is AsyncRead + AsyncWrite.

Examples of this include:

Note: Transport is currently designed around AsyncWrite and AsyncRead from the futures crate, which are different from the tokio AsyncRead and AsyncWrite traits. Hopefully this is a temporary situation.

It is currently never necessary to manually implement this trait.

Required methods

in order to support downcasting from a Box<dyn Transport>, Transport requires implementing an as_box_any function.

Implementors