pub struct HttpConn {
    pub remote_addr: SocketAddr,
    pub buf: FixedBuf<8192>,
    pub stream: TcpStream,
    pub read_state: ReadState,
    pub write_state: WriteState,
}

Fields

remote_addr: SocketAddrbuf: FixedBuf<8192>stream: TcpStreamread_state: ReadStatewrite_state: WriteState

Implementations

Errors

Returns an error when:

  • we did not send a response to the previous request
  • the connection is closed
  • we did not read the response body of the previous request
  • we fail to read the request
  • we fail to parse the request
Errors

Returns an error when:

  • the connection is closed
  • a response was already sent
  • we fail to send the response
Errors

Returns an error when:

  • the client did not send a request body
  • the request body was already read from the client
  • the client used an unsupported transfer encoding
  • we fail to read the request body
Errors

Returns an error when:

  • the client did not send a request body
  • the request body was already read from the client
  • the client used an unsupported transfer encoding
  • the client sends a request body that is larger than max_len
  • we fail to read the request body
  • we fail to create or write the temporary file
Errors

Returns an error when a response was already sent, the connection is closed, or it fails to send the response bytes over the network connection.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.