#iterator #collections #parameters #name #options #collection #data-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

#248 in Data structures

Download history 462/week @ 2023-08-04 205/week @ 2023-08-11 259/week @ 2023-08-18 231/week @ 2023-08-25 281/week @ 2023-09-01 359/week @ 2023-09-08 331/week @ 2023-09-15 347/week @ 2023-09-22 311/week @ 2023-09-29 380/week @ 2023-10-06 322/week @ 2023-10-13 357/week @ 2023-10-20 213/week @ 2023-10-27 170/week @ 2023-11-03 193/week @ 2023-11-10 169/week @ 2023-11-17

776 downloads per month
Used in 6 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