arguments 0.6.2

The package provides a parser for command-line arguments.

Crate arguments [] [src]

Parser for command-line arguments.

Example

let arguments = std::env::args(); // foo --no-bar --baz 42 --qux 'To be?'
let arguments = arguments::parse(arguments).unwrap();

println!("Foo: {}", arguments.program);
println!("Bar: {}", arguments.get::<bool>("bar").unwrap());
println!("Baz: {}", arguments.get::<usize>("baz").unwrap());
println!("Qux: {}", arguments.get::<String>("qux").unwrap());

Structs

Arguments

Command-line arguments.

Error

An error.

Options

A collection of named parameters.

Parser

A parser for command-line arguments.

Functions

parse

Parse command-line arguments.

Type Definitions

Result

A result.