#parameters #named #structure

options

The package provides a data structure for managing named parameters

11 unstable releases

0.5.3 Jun 28, 2023
0.5.2 Nov 5, 2022
0.5.1 Oct 23, 2016
0.5.0 Jun 17, 2016
0.3.2 Jul 9, 2015

#138 in Configuration

Download history 258/week @ 2023-12-11 203/week @ 2023-12-18 92/week @ 2023-12-25 280/week @ 2024-01-01 442/week @ 2024-01-08 419/week @ 2024-01-15 176/week @ 2024-01-22 202/week @ 2024-01-29 161/week @ 2024-02-05 160/week @ 2024-02-12 373/week @ 2024-02-19 372/week @ 2024-02-26 188/week @ 2024-03-04 421/week @ 2024-03-11 236/week @ 2024-03-18 311/week @ 2024-03-25

1,175 downloads per month
Used in 9 crates (2 directly)

Apache-2.0/MIT

10KB
205 lines

Options Package Documentation Build

The package provides a data structure for managing named parameters.

Example

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());

Contribution

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.

No runtime deps