pub enum FlagType {
String,
Bool,
Int,
Float,
StringSlice,
StringArray,
Choice(Vec<String>),
Range(i64, i64),
File,
Directory,
}Expand description
Represents the type of value a flag accepts
This enum determines how flag values are parsed from string input.
Variants§
String
Accepts any string value
Bool
Accepts boolean values (true/false, yes/no, 1/0)
Int
Accepts integer values
Float
Accepts floating-point values
StringSlice
Accepts multiple string values (can be specified multiple times)
StringArray
Accepts multiple string values with accumulation (–tag=a –tag=b)
Choice(Vec<String>)
Must be one of a predefined set of values
Range(i64, i64)
Numeric value within a specific range
File
Must be a valid file path
Directory
Must be a valid directory path
Trait Implementations§
impl Eq for FlagType
impl StructuralPartialEq for FlagType
Auto Trait Implementations§
impl Freeze for FlagType
impl RefUnwindSafe for FlagType
impl Send for FlagType
impl Sync for FlagType
impl Unpin for FlagType
impl UnwindSafe for FlagType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more