Struct viz::prelude::Context[][src]

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

The Context of an HTTP request - response.

Implementations

Consumes the request to Context

Returns a reference to the associated HTTP method.

Returns the associated version.

Returns a reference to the associated URI.

Returns a reference to the associated path portion of the URL.

Returns a reference to the associated query portion of the URL.

Returns a reference to the associated host portion of the URL.

Gets content type

Gets content length

Returns a reference to the associated header by key.

Returns a value by header key.

Returns a reference to the associated header field map.

Returns a reference to the associated extensions.

Returns a mutable reference to the associated extensions.

Consumes the request, returning just the body.

Returns a reference to the associated middleware.

Returns a mutable reference to the associated middleware.

Returns a data from the Context with a Extractor.

Invokes the next middleware.

Extends Context

Gets application config

Gets cookies.

Gets single cookie by name.

Extracts Form Data from the request’ body.

Extracts JSON Data from the request’ body.

Extracts Multipart from the request’ body.

Gets parameters.

Gets single parameter by name.

Gets query parameters from the path

Gets an app state.

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Returns Output

Invokes the handler within the given Context and then returns Output

Returns Output

Invokes the handler within the given Context and then returns Output

Returns Output

Invokes the handler within the given Context and then returns Output

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