Struct jwt_actix::ServiceRequest[]

pub struct ServiceRequest { /* fields omitted */ }
Expand description

A service level request wrapper.

Allows mutable access to request’s internal structures.

Implementations

Deconstruct request into parts

Get mutable access to inner HttpRequest and Payload

Construct request from parts.

Construct request from request.

The returned ServiceRequest would have no payload.

Create service response

Create service response for error

This method returns reference to the request head

This method returns reference to the request head

Request’s uri.

Read the Request method.

Read the Request Version.

Returns request’s headers.

Returns mutable request’s headers.

The target path of this Request.

Counterpart to [HttpRequest::query_string].

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.

To get client connection information ConnectionInfo should be used.

Will only return None when called in unit tests.

Get ConnectionInfo for the current request.

Returns a reference to the Path parameters.

Params is a container for URL parameters. A variable segment is specified in the form {identifier}, where the identifier can be used later in a request handler to access the matched value for that segment.

Returns a mutable reference to the Path parameters.

Counterpart to [HttpRequest::match_name].

Counterpart to [HttpRequest::match_pattern].

Get a reference to a ResourceMap of current application.

Service configuration

Counterpart to [HttpRequest::app_data].

Counterpart to [HttpRequest::conn_data].

Return request cookie.

Set request payload.

Add data container to request’s resolution set.

In middleware, prefer extensions_mut for request-local data since it is assumed that the same app data is presented for every request.

Creates a context object for use with a guard.

Useful if you are implementing

Trait Implementations

Formats the value using the given formatter. Read more

Type of message payload stream

Read the message headers.

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

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

Message payload stream

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.

Type of resource’s path returned in resource_path.

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 produced by the service.

Errors produced by the service.

The TransformService value created by this factory

Errors produced while building a transform service.

The future response value.

Creates and returns a new Transform component, 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more