#parameters #named #structure

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

#129 in Configuration

Download history 171/week @ 2024-10-22 235/week @ 2024-10-29 150/week @ 2024-11-05 447/week @ 2024-11-12 323/week @ 2024-11-19 259/week @ 2024-11-26 165/week @ 2024-12-03 261/week @ 2024-12-10 191/week @ 2024-12-17 116/week @ 2024-12-24 113/week @ 2024-12-31 275/week @ 2025-01-07 170/week @ 2025-01-14 310/week @ 2025-01-21 376/week @ 2025-01-28 394/week @ 2025-02-04

1,293 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