[−][src]Crate rocket_config
Rocket-Config - Core API Documentation
Hello, and welcome to the core Rocket-Config API documentation!
Rocket-Config is a Rust library providing a plugin for Rocket loading and managing configuration files for Rocket.
It allows two configuration file formats: YAML and JSON. Deserialization is done using serde and specialized packages serde_json and serde_yaml.
Libraries
Rocket-Config's functionality is split into two crates:
- Core - This core library. Needed by every Rocket application using rocket-config.
- Codegen - Provides useful code generation functionality for many Rocket applications. Completely optional.
Usage
First, depend on rocket-config
in Cargo.toml
:
[dependencies]
rocket-config = "0.0.1"
Then, add the following to the top of your main.rs
file:
#![feature(proc_macro_hygiene, decl_macro)] #[macro_use] extern crate rocket_config; // ...
Modules
error | Type representing various errors that can occur in a Rocket application. |
Structs
Configuration | |
Factory | |
Number | Represents a number, whether integer or floating point. |
Enums
Value | The Value enum, a loosely typed way of representing any valid value. |
Traits
Index | A type that can be used to index into a |
Type Definitions
Result | A specialized |