Struct easy_args::args::Args [−][src]
pub struct Args { /* fields omitted */ }Expand description
Holds all the command-line arguments given by the user.
Each argument is contained within a HashMap that can be index by the
argument’s name.
Implementations
Determines if an argument of a given name was set by the user in the command-line.
Example
if args.is_set("window-height") { resize_window(args.integer("window-height").unwrap()); }
Returns a reference to the boolean value that corresponds with the given argument name.
Example
if args.boolean("windowed") == Some(&true) { set_windowed_mode(); }
Returns a reference to the i64 value that corresponds with the given argument name.
Example
let num_leaves_in_pile = *args.integer("leaves").unwrap_or(&0);
Returns a reference to the u64 value that corresponds with the given argument name.
Example
let size = *args.unsigned_integer("size").unwrap_or(&0);
Returns a reference to the String value that corresponds with the given argument name.
Exmaple
let username args.string("username").unwrap_or(&"Guest".to_string())
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Argsimpl UnwindSafe for Args