#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

#157 in Configuration

Download history 134/week @ 2024-09-18 116/week @ 2024-09-25 126/week @ 2024-10-02 381/week @ 2024-10-09 407/week @ 2024-10-16 185/week @ 2024-10-23 226/week @ 2024-10-30 300/week @ 2024-11-06 329/week @ 2024-11-13 335/week @ 2024-11-20 212/week @ 2024-11-27 216/week @ 2024-12-04 218/week @ 2024-12-11 170/week @ 2024-12-18 135/week @ 2024-12-25 87/week @ 2025-01-01

678 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