Expand description

Defines types for passing request state through Middleware and Handler implementations

Re-exports

pub use crate::state::request_id::request_id;

Modules

Defines a unique id per Request that should be output with all logging.

Structs

Provides storage for request state, and stores one item of each type. The types used for storage must implement the gotham::state::StateData trait to allow its storage. The gotham_derive crate provides a custom derive for StateData to make this more convenient.

Traits

A trait for accessing data that is stored in State.

A marker trait for types that can be stored in State.

Functions

Returns the client SocketAddr as reported by hyper, if one was present. Certain connections do not report a client address, in which case this will return None.