[][src]Module vial::prelude

The prelude pulls in all the main types, traits, and macros:

Re-exports

pub use crate::asset;
pub use crate::asset_dir;
pub use crate::routes;
pub use crate::run;
pub use crate::use_state;

Structs

Request

Contains information about a single request.

Response

Each request ultimately ends in a Response that is served to the client and then discarded, like fallen flower petals. Together with Request and Responder it forms the holy trinity of R's in Vial.

Router

Router keeps track of all the routes defined by vial::routes! and can produce an action for a given HTTP Method and URL path combination using action_for.

Enums

Method

Method is just an enum representing the HTTP methods Vial supports. Which is not all of them.

Traits

Responder

The Responder trait converts your custom types or a few basic Rust types into a Response that gets hand delivered to the HTTP client in a timley fashion, barring any weather delays.