options

Crates.iooptions
lib.rsoptions
version0.6.1
sourcesrc
created_at2015-06-14 00:49:40.122791
updated_at2024-11-12 10:43:34.729416
descriptionThe package provides a data structure for managing named parameters.
homepagehttps://github.com/stainless-steel/options
repositoryhttps://github.com/stainless-steel/options
max_upload_size
id2375
size12,218
Owners (github:buoyantio:owners)

documentation

https://docs.rs/options

README

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.

Commit count: 43

cargo fmt