The following cmdargs program demonstrates how to parse command-line arguments in using the clap crate.
This zip file contains the complete crate.