Struct tokio_http2::http::HttpProto
[−]
[src]
pub struct HttpProto { pub logger: Option<Logger>, pub router: Option<Router>, }
Proto and Codec can have STATE so you can add features to these two and then pass them to TcpServer.
Fields
logger: Option<Logger>
router: Option<Router>
Trait Implementations
impl Default for HttpProto
[src]
impl ServerProto<TcpStream> for HttpProto
[src]
type Request = Request
Request messages.
type Response = Response
Response messages.
type Transport = Framed<TcpStream, HttpCodec>
The message transport, which works with I/O objects of type T
. Read more
type BindTransport = Result<Framed<TcpStream, HttpCodec>>
A future for initializing a transport from an I/O object. Read more
fn bind_transport(&self, io: TcpStream) -> Result<Framed<TcpStream, HttpCodec>>
Build a transport from the given I/O object, using self
for any configuration. Read more