#parameters #42

options

The package provides a data structure for managing named parameters

13 unstable releases

0.6.1 Nov 12, 2024
0.5.3 Jun 28, 2023
0.5.2 Nov 5, 2022
0.5.1 Oct 23, 2016
0.3.2 Jul 9, 2015

#185 in Configuration

Download history 186/week @ 2024-12-16 144/week @ 2024-12-23 114/week @ 2024-12-30 249/week @ 2025-01-06 182/week @ 2025-01-13 273/week @ 2025-01-20 416/week @ 2025-01-27 443/week @ 2025-02-03 616/week @ 2025-02-10 428/week @ 2025-02-17 321/week @ 2025-02-24 246/week @ 2025-03-03 195/week @ 2025-03-10 212/week @ 2025-03-17 157/week @ 2025-03-24 171/week @ 2025-03-31

809 downloads per month
Used in 8 crates (via arguments)

Apache-2.0/MIT

10KB
199 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