pub struct UnitRequest<'a> { /* private fields */ }
Expand description

A request received by the Nginx Unit server.

This object can be used to inspect the properties and headers of the request, and send a response back to the client.

Implementations

Send an initial response to the client, and return a UnitResponse object that allows sending additional data chunks to the client.

This method will consume the request object and wrap it in a response object. The returned object will still deref to a reference of a request object, allowing inspection of the request but no longer allowing the initiation of a second response.

Copy bytes from the request body into the target buffer and return the number of bytes written.

If the buffer is smaller than the contents of the body, the contents will be truncated to the size of the buffer.

Create an interator over all header (name, value) tuples.

Return the method of the request (e.g. “GET”).

Return the protocol version of the request (e.g. “HTTP/1.1”).

Return the remote IP address of the client.

Return the local IP address of the server.

Return the host name of the server.

Return the combined URI path and query string.

Return the URI path.

Return the URI query string.

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.