Struct UnknownArgumentValueParser
pub struct UnknownArgumentValueParser { /* private fields */ }
When encountered, report [ErrorKind::UnknownArgument][crate::error::ErrorKind::UnknownArgument]
Useful to help users migrate, either from old versions or similar tools.
Examples
# use clap_builder as clap;
# use Command;
# use Arg;
let cmd = new
.args;
// Use a supported version of the argument
let matches = cmd.clone.try_get_matches_from.unwrap;
assert!;
assert_eq!;
// Use one of the invalid versions
let err = cmd.try_get_matches_from.unwrap_err;
assert_eq!;
Implementations
impl UnknownArgumentValueParser
fn suggest_arg(arg: impl Into<Str>) -> SelfSuggest an alternative argument
fn suggest(text: impl Into<StyledStr>) -> SelfProvide a general suggestion
fn and_suggest(self, text: impl Into<StyledStr>) -> SelfExtend the suggestions
Trait Implementations
impl Clone for UnknownArgumentValueParser
fn clone(&self) -> UnknownArgumentValueParser
impl Debug for UnknownArgumentValueParser
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl TypedValueParser for UnknownArgumentValueParser
type Value = String;fn parse_ref(&self, cmd: &Command, arg: Option<&Arg>, value: &OsStr) -> Result<Self::Value, Error>fn parse_ref_(&self, cmd: &Command, arg: Option<&Arg>, _value: &OsStr, source: ValueSource) -> Result<Self::Value, Error>
Auto Trait Implementations
impl Freeze for UnknownArgumentValueParser
impl RefUnwindSafe for UnknownArgumentValueParser
impl Send for UnknownArgumentValueParser
impl Sync for UnknownArgumentValueParser
impl Unpin for UnknownArgumentValueParser
impl UnsafeUnpin for UnknownArgumentValueParser
impl UnwindSafe for UnknownArgumentValueParser
Blanket Implementations
impl<I> IntoResettable<ValueParser> for UnknownArgumentValueParser
where
I: Into<ValueParser>,
fn into_resettable(self) -> Resettable<ValueParser>
impl<T> Any for UnknownArgumentValueParser
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for UnknownArgumentValueParser
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for UnknownArgumentValueParser
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for UnknownArgumentValueParser
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for UnknownArgumentValueParser
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for UnknownArgumentValueParser
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for UnknownArgumentValueParser
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for UnknownArgumentValueParser
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for UnknownArgumentValueParser
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>