Skip to main content

Module argument

Module argument 

Source
Expand description

Positional argument parameter for click-rs.

This module provides the Argument struct for positional command-line parameters. Arguments are required by default and appear without dashes in the command line.

§Reference

Based on Python Click’s core.py:Argument class (line 3319+).

§Example

use click::argument::Argument;
use click::parameter::Parameter;

let arg = Argument::new("filename")
    .help("The file to process")
    .build();

assert!(arg.required());
assert_eq!(arg.human_readable_name(), "FILENAME");

Structs§

Argument
A positional command-line argument.
ArgumentBuilder
Builder for creating Argument instances.

Traits§

AnyTypeConverter
A type-erased wrapper for TypeConverter that stores converted values as Box<dyn Any>.

Type Aliases§

ShellCompleteCallback
Custom shell completion callback type for arguments.