Skip to main content

Crate rainier_support

Crate rainier_support 

Source
Expand description

§rainier-support

The primitives every other Rainier crate shares, and nothing else. It sits at the bottom of the dependency graph and depends on no other Rainier crate, which is what lets the components above it stay independent of each other.

  • Error / Result — one error type, carrying the status and the structured details the HTTP layer needs to render any failure.
  • Extensions — the type-keyed bag behind request attributes and container bindings.
  • str — the inflection vocabulary resource routing and the code generators are written against.
  • Setting / setting_enum! — a closed set of config values, so a driver name is an enum rather than a string nobody validates.
  • BoxFuture — the boxed future the framework’s dyn-safe async traits return.

Re-exports§

pub use build_info::BuildInfo;
pub use error::Context;
pub use error::Error;
pub use error::ErrorKind;
pub use error::Result;
pub use extensions::Extensions;
pub use setting::Setting;

Modules§

build_info
What is actually running — BuildInfo and build_info!.
error
The framework error type.
extensions
A type-keyed bag of values — Extensions.
prelude
The framework’s prelude: what nearly every module wants in scope.
setting
Closed-set settings — Setting and setting_enum!.
str
String inflection helpers, as free functions.

Macros§

build_info
The BuildInfo of the crate this is written in.
setting_enum
Declare a closed-set setting: an enum plus everything that follows from it.

Functions§

boxed
Box a future into a BoxFuture. Sugar for Box::pin, named so call sites read as intent rather than allocation.

Type Aliases§

BoxFuture
A heap-allocated, Send future — the return type of every dyn-safe async method in the framework.
BoxedFuture
A 'static BoxFuture, for futures that outlive the call that made them (a spawned job, a queued listener).
LocalBoxFuture
A boxed future that is not Send, and so cannot cross threads.