Crate thruster

source ·

Re-exports

pub use builtins::basic_context::BasicContext;
pub use builtins::basic_context::CookieOptions;
pub use builtins::basic_hyper_context::BasicHyperContext;

Modules

Macros

The middleware macro takes a series of functions whose contexts all have into implemented, and then links them together to run in series. The result of this macro is a single MiddlewareChain.

Structs

App, the main component of Thruster. The App is the entry point for your application and handles all incomming requests. Apps are also composeable, that is, via the subapp method, you can use all of the methods and middlewares contained within an app as a subset of your app’s routes.
The MiddlewareChain is used to wrap a series of middleware functions in such a way that the tail can be accessed and modified later on. This allows Thruster to properly compose pieces of middleware into a single long chain rather than relying on disperate parts.
The request object is the default request object provied by Thruster. If a different server is used, such as Hyper, then you’ll need to reference that server’s “request” documentation instead.

Traits

A Context is what will be passed between functions in the middleware for the defined routes of Thruster. Since a new context is made for each incomming request, it’s important to keep this struct lean and quick, as well as the context_generator associated with it.

Functions

Type Definitions