Parse arg

Traits and implementations for parsing command-line arguments.

About

This crate provides traits and implementations for parsing command-line arguments. The core of the crate is ParseArg trait. It works much like FromStr trait, but with these differences:

Further, the crate provides ParseArgFromStr trait, which causes any type implementing it to auto-implement ParseArg trait. This is handy when implementing ParseArg for types that already have FromStr implemented, so that boilerplate is reduced.

Since matching both --foo VAL and --foo=VAL arguments is common and it's not an easy task to implement on top of OsStr, due to limitation of std, this crate also provides a function to match and parse such arguments.

Contibutions

I will merge new implementations liberally, provided these conditions are met:

License

MITNFA