Registry / cli / structopt

structopt

JSON →
library0.3.26rscratesunverified

Parse command line argument by defining a struct.

# Cargo.toml [dependencies] structopt = "0.3.26"
INSTALL
IMPORT
SIG · STRUCTOPT
S
structopt
clirustv0.3.26
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StructOpt
use structopt::StructOpt;

Define a CLI with a struct and parse arguments.

use structopt::StructOpt; #[derive(StructOpt)] struct Cli { name: String, } fn main() { let args = Cli::from_args(); println!("Hello, {}!", args.name); }
Debug
Known issues
breakingStructopt is deprecated in favor of clap v3 with derive feature
fix
Migrate to clap with derive feature: use clap::Parser instead of structopt::StructOpt.
affects: >=0.3.0
Upgrade
Version history
0.3.26latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
Amazon
1
Resources
structopt — cargo add structopt · libregistry