#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

#138 in Configuration

Download history 256/week @ 2024-10-27 172/week @ 2024-11-03 416/week @ 2024-11-10 252/week @ 2024-11-17 291/week @ 2024-11-24 209/week @ 2024-12-01 240/week @ 2024-12-08 183/week @ 2024-12-15 149/week @ 2024-12-22 126/week @ 2024-12-29 233/week @ 2025-01-05 187/week @ 2025-01-12 264/week @ 2025-01-19 365/week @ 2025-01-26 487/week @ 2025-02-02 588/week @ 2025-02-09

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