This open (pub fields) struct represents a http upgrade. It contains all of the data available on a Conn, as well as owning the underlying transport.
Important implementation note: When reading directly from the
transport, ensure that you read from
buffer first if there are bytes
in it. Alternatively, read directly from the Upgrade, as that
AsyncRead] implementation will drain the buffer first before
reading from the transport.
The http request headers
The request path
The http request method
Any state that has been accumulated on the Conn before negotiating the upgrade
The underlying io (often a TcpStream or similar)
Any bytes that have been read from the underlying tcpstream already. It is your responsibility to process these bytes before reading directly from the transport.
Stopper which can and should be used to gracefully shut
down any long running streams or futures associated with this
read-only access to the request headers
the http request path up to but excluding any query component
retrieves the query component of the path
the http method
any state that has been accumulated on the Conn before negotiating the upgrade.
Modify the transport type of this upgrade. This is useful for boxing the transport in order to erase the type argument.
AsyncReadExt::read()], except it reads into a slice of buffers. Read more
buf. Read more
limitbytes from it. Read more
AsyncRead] into a [
Stream] of bytes. Read more
dyn AsyncRead + Send + 'a. Read more
AsyncWriteExt::write()], except that it writes a slice of buffers. Read more
dyn AsyncWrite + Send + 'a. Read more
Returns the argument unchanged.