pub struct Arg<'a, T: FromStr + Clone> {
pub name: String,
pub description: Option<String>,
pub value: Option<T>,
pub completor: Option<Completor<'a>>,
pub default_value: Option<T>,
}
Fields§
§name: String
§description: Option<String>
§value: Option<T>
§completor: Option<Completor<'a>>
§default_value: Option<T>
Implementations§
Trait Implementations§
source§impl<'a, T: FromStr + Clone> Input for Arg<'a, T>
impl<'a, T: FromStr + Clone> Input for Arg<'a, T>
fn parse(&mut self, token: &str) -> CliResult<bool>
fn display_name(&self) -> String
fn type_name(&self) -> InputType
fn parsed(&self) -> bool
fn complete(&mut self, value: &str) -> CliResult<Vec<String>>
fn is_bool_flag(&self) -> bool
fn description(&self) -> Option<String>
fn has_default(&self) -> bool
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Arg<'a, T>
impl<'a, T> !Send for Arg<'a, T>
impl<'a, T> !Sync for Arg<'a, T>
impl<'a, T> Unpin for Arg<'a, T>where T: Unpin,
impl<'a, T> !UnwindSafe for Arg<'a, T>
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