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
Source§fn complete(&mut self, value: &str) -> CliResult<Vec<String>>
fn complete(&mut self, value: &str) -> CliResult<Vec<String>>
must not return completions that don’t start with value, otherwise bash breaks
fn is_bool_flag(&self) -> bool
fn description(&self) -> Option<String>
fn has_default(&self) -> bool
Auto Trait Implementations§
impl<'a, T> Freeze for Arg<'a, T>where
T: Freeze,
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