| Crates.io | options |
| lib.rs | options |
| version | 0.6.1 |
| created_at | 2015-06-14 00:49:40.122791+00 |
| updated_at | 2024-11-12 10:43:34.729416+00 |
| description | The package provides a data structure for managing named parameters. |
| homepage | https://github.com/stainless-steel/options |
| repository | https://github.com/stainless-steel/options |
| max_upload_size | |
| id | 2375 |
| size | 12,218 |
The package provides a data structure for managing named parameters.
use options::Options;
let mut options = Options::new();
options
.set("foo", 42)
.set("bar", "To be or not to be?")
.set("baz", "Hello, world!".to_string());
println!("foo = {}", options.get::<i32>("foo").unwrap());
println!("bar = {}", options.get::<&str>("bar").unwrap());
println!("baz = {}", options.get::<String>("baz").unwrap());
Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.