pub enum ArgumentType {
String,
Integer,
Float,
Bool,
Path,
}Expand description
Supported argument and option types
These types are used for automatic parsing and validation of user input.
§Serialization
Types are serialized as lowercase strings in YAML/JSON:
String→ “string”Integer→ “integer”Float→ “float”Bool→ “bool”Path→ “path”
Variants§
String
UTF-8 string
Integer
Signed integer (i64)
Float
Floating-point number (f64)
Bool
Boolean value (true/false, yes/no, 1/0)
Path
File system path
Represents a path that may or may not exist, depending on validation rules.
Implementations§
Trait Implementations§
Source§impl Clone for ArgumentType
impl Clone for ArgumentType
Source§fn clone(&self) -> ArgumentType
fn clone(&self) -> ArgumentType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArgumentType
impl Debug for ArgumentType
Source§impl<'de> Deserialize<'de> for ArgumentType
impl<'de> Deserialize<'de> for ArgumentType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ArgumentType
impl PartialEq for ArgumentType
Source§impl Serialize for ArgumentType
impl Serialize for ArgumentType
impl Copy for ArgumentType
impl Eq for ArgumentType
impl StructuralPartialEq for ArgumentType
Auto Trait Implementations§
impl Freeze for ArgumentType
impl RefUnwindSafe for ArgumentType
impl Send for ArgumentType
impl Sync for ArgumentType
impl Unpin for ArgumentType
impl UnwindSafe for ArgumentType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.