pub struct InputChain<T> { /* private fields */ }Implementations§
Source§impl<T: Clone + Send + Sync + 'static> InputChain<T>
impl<T: Clone + Send + Sync + 'static> InputChain<T>
pub fn new() -> Self
pub fn try_source<C: InputCollector<T> + 'static>(self, source: C) -> Self
pub fn try_source_with_kind<C: InputCollector<T> + 'static>( self, source: C, kind: InputSourceKind, ) -> Self
pub fn validate<F>(self, f: F, error_msg: impl Into<String>) -> Self
pub fn validate_with<F>(self, f: F) -> Self
pub fn default(self, value: T) -> Self
pub fn resolve(&self, matches: &ArgMatches) -> Result<T, InputError>
pub fn resolve_from( &self, matches: &ArgMatches, sources: &InputSources, ) -> Result<T, InputError>
pub fn resolve_with_source( &self, matches: &ArgMatches, ) -> Result<ResolvedInput<T>, InputError>
pub fn resolve_from_with_source( &self, matches: &ArgMatches, sources: &InputSources, ) -> Result<ResolvedInput<T>, InputError>
pub fn has_available_source(&self, matches: &ArgMatches) -> bool
pub fn has_available_source_from( &self, matches: &ArgMatches, sources: &InputSources, ) -> bool
pub fn source_count(&self) -> usize
Trait Implementations§
Source§impl<T> Debug for InputChain<T>
impl<T> Debug for InputChain<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for InputChain<T>
impl<T> !UnwindSafe for InputChain<T>
impl<T> Freeze for InputChain<T>
impl<T> Send for InputChain<T>
impl<T> Sync for InputChain<T>
impl<T> Unpin for InputChain<T>
impl<T> UnsafeUnpin for InputChain<T>where
Vec<(Box<dyn InputCollector<T>>, InputSourceKind)>: UnsafeUnpin,
Vec<(Box<dyn Fn(&T) -> Result<(), String> + Send + Sync>, String)>: UnsafeUnpin,
Option<T>: UnsafeUnpin,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more