Registry / cli / structopt-derive

structopt-derive

JSON →
library0.4.18rscratesunverified

Parse command line arguments by defining a struct, derive crate.

# Cargo.toml [dependencies] structopt-derive = "0.4.18"
INSTALL
IMPORT
SIG · STRUCTOPT-DERIVE
S
structopt-derive
clirustv0.4.18
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;

Defines a CLI with a required name argument.

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(Parser)]`.
affects: >=0.4.0
Upgrade
Version history
0.4.18latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Resources
structopt-derive — cargo add structopt-derive · libregistry