Crate nickel [−] [src]
Nickel is supposed to be a simple and lightweight foundation for web applications written in Rust. Its API is inspired by the popular express framework for JavaScript.
Some of the features are:
- Easy handlers: A handler is just a function that takes a
RequestandResponseWriter - Variables in routes. Just write
my/route/:someid - Easy parameter access:
request.params.get(&"someid") - simple wildcard routes:
/some/*/route - double wildcard routes:
/a/**/route - middleware
Reexports
pub use middleware::{Continue, Halt}; |
pub use router::{Router, Route, RouteResult, HttpRouter}; |
pub use mimes::MediaType; |
Modules
| mimes | |
| router |
A |
| status |
Macros
| middleware! |
Macro to reduce the boilerplate required for using unboxed
closures as |
| router! | |
| try_with! |
Structs
| DefaultErrorHandler | |
| FaviconHandler | |
| Nickel |
Nickel is the application object. It's the surface that holds all public APIs. |
| NickelError |
NickelError is the basic error type for HTTP errors as well as user defined errors.
One can pattern match against the |
| Query | |
| Request |
A container for all the request data |
| Response |
A container for the response |
| StaticFilesHandler |
Enums
| Action |
Traits
| ErrorHandler | |
| JsonBody | |
| Middleware | |
| QueryString | |
| Responder |
This trait provides convenience for translating a number
of common return types into a |
Type Definitions
| MiddlewareResult |