pub struct OptionInferrer { /* private fields */ }Expand description
Option Type Inferrer - Infers option types from names and patterns
Implementations§
Source§impl OptionInferrer
impl OptionInferrer
Sourcepub fn from_config_path(config_path: &str) -> Result<Self>
pub fn from_config_path(config_path: &str) -> Result<Self>
Create option inferrer from a specific config file
Sourcepub fn infer_types(&self, options: &mut [CliOption])
pub fn infer_types(&self, options: &mut [CliOption])
Infer option types for a list of options
Sourcepub fn infer_type(&self, option: &CliOption) -> OptionType
pub fn infer_type(&self, option: &CliOption) -> OptionType
Infer the type of a single option
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptionInferrer
impl RefUnwindSafe for OptionInferrer
impl Send for OptionInferrer
impl Sync for OptionInferrer
impl Unpin for OptionInferrer
impl UnwindSafe for OptionInferrer
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