logo
pub struct Request<P = BoxedPayloadStream> { /* private fields */ }
Expand description

An HTTP request.

Implementations

Create new Request instance

Create new Request instance

Create new Request instance

Get request’s payload

Get request’s payload

Split request into request head and payload

Http message part of the request

Mutable reference to the message’s headers.

Request’s uri.

Mutable reference to the request’s uri.

Read the Request method.

Read the Request Version.

The target path of this Request.

Check if request requires connection upgrade

Peer socket address.

Peer address is the directly connected peer’s socket address. If a proxy is used in front of the Actix Web server, then it would be address of this proxy.

Will only return None when called in unit tests.

Returns a reference a piece of connection data set in an on-connect callback.

let opt_t = req.conn_data::<PeerCertificate>();

Returns the connection-level data/extensions container if an on-connect callback was registered, leaving an empty one in its place.

Returns the request-local data/extensions container, leaving an empty one in its place.

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Type of message payload stream

Read the message headers.

Message payload stream

Returns a reference to the request-local data/extensions container.

Returns a mutable reference to the request-local data/extensions container.

Read the request content type. If request did not contain a Content-Type header, an empty string is returned. Read more

Get content type encoding. Read more

Convert the request content type to a known mime type.

Check if request has chunked transfer encoding.

Responses given by the service.

Errors produced by the service when polling readiness or executing call.

The future response value.

Returns Ready when the service is able to process requests. Read more

Process the request and return the response asynchronously. Read more

Responses given by the created services.

Errors produced by the created services.

Service factory configuration.

The kind of Service created by this factory.

Errors potentially raised while building a service.

The future of the Service instance.g

Create and return a new service asynchronously.

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

Performs the conversion.

Performs the conversion.

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.