Skip to main content

Module types

Module types 

Source
Expand description

Parameter types for click-rs.

This module provides the TypeConverter trait and all built-in types for converting and validating command-line arguments.

Structs§

BoolType
A boolean parameter type.
Choice
A parameter type that restricts values to a fixed set of choices.
CompletionItem
A shell completion item.
DateTimeType
A datetime parameter type that parses ISO 8601 format strings.
FileType
A parameter type for files.
FloatRange
A floating-point type restricted to a range of values.
FloatType
A floating-point parameter type.
IntRange
An integer type restricted to a range of values.
IntType
An integer parameter type.
LazyFile
A wrapper around a file that supports lazy opening and stdin/stdout.
PathType
A parameter type for file system paths with optional validation.
StringType
A string parameter type (the default).
TupleType
A composite parameter type that collects multiple values with different types.
UnprocessedType
A type that passes through values without any processing.
UuidType
A UUID parameter type.

Enums§

FileMode
The mode for opening a file.
TupleValue
A converted tuple value with dynamic types.

Constants§

BOOL
Singleton instance for boolean type.
FLOAT
Singleton instance for float type.
INT
Singleton instance for integer type.
STRING
Singleton instance for string type.
UNPROCESSED
Singleton instance for unprocessed type.
UUID
Singleton instance for UUID type.

Traits§

TypeConverter
Trait for parameter types that convert and validate command-line values.

Type Aliases§

BoxedTypeConverter
A boxed parameter type for runtime polymorphism.