Crate rocket_response
source · [−]Expand description
rocket-response - Provides enum for variable Rocket Responses
This crate provides 3 enums to be flexible in returning Responses.
- RocketResponse provides all non-generic Response types.
- RocketResponseGeneric provides Response-types non-generic and generic using a single generic type.
- RocketResponseGeneric2 allows a different Flash type.
If you miss any Response, you are welcome to open an issue or even better provide a pull-request!
Because it is difficult to decide on the generics what might be useful, your usecases are really welcome in an issue.
Usage
For usage add the crate to your dependencies
[dependencies]
rocket-response = { version = "0.0.1-rc.2" }
Features
You can depend on a couple of features, which provide additional types.
- json
- msgpack
- templates-handlebars or templates-tera
[dependencies]
rocket-response = { version = "0.0.1-rc.2", features = ["json", "templates-tera"] }