Struct shio::Context [] [src]

pub struct Context { /* fields omitted */ }

Context represents the context of the current HTTP request.

A Context consists of: - The current HTTP Request. - A Handle referencing the event loop in which this request is being handled.

Methods

impl Context
[src]

Return a reference to a handle to the event loop this Context is associated with.

Take the request body.

Puts a value into the request context.

Gets a value from the request context.

Panics

If there is no value in the request context of the given type.

Gets a value from the request context.

Methods from Deref<Target = Request>

Returns a reference to the request HTTP version.

Returns a reference to the request headers.

Returns a reference to the request HTTP method.

Returns a reference to the request URI.

Returns a reference to the request path.

Take the request body.

Trait Implementations

impl Deref for Context
[src]

The resulting type after dereferencing

The method called to dereference a value