pub struct OptionDeclarationBuilder<T> { /* private fields */ }
Expand description
Build flag declarations
Implementations§
Source§impl<T> OptionDeclarationBuilder<T>where
T: 'static,
impl<T> OptionDeclarationBuilder<T>where
T: 'static,
pub fn new(flag: &str) -> OptionDeclarationBuilder<T>
pub fn help(self, help: impl AsRef<str>) -> OptionDeclarationBuilder<T>
pub fn takes_value(self, takes_value: bool) -> OptionDeclarationBuilder<T>
pub fn allow_multiple_values( self, allow_multiple_values: bool, ) -> OptionDeclarationBuilder<T>
pub fn optional(self, optional: bool) -> OptionDeclarationBuilder<T>
pub fn value_parser<F, E>(self, func: F) -> OptionDeclarationBuilder<T>
pub fn build(self) -> OptionDeclaration
Source§impl<T> OptionDeclarationBuilder<T>
impl<T> OptionDeclarationBuilder<T>
Sourcepub fn use_from_str(self) -> OptionDeclarationBuilder<T>
pub fn use_from_str(self) -> OptionDeclarationBuilder<T>
Use the FromStr::from_str as the value parser
Source§impl OptionDeclarationBuilder<bool>
impl OptionDeclarationBuilder<bool>
pub fn flag(flag: &str) -> OptionDeclarationBuilder<bool>
Auto Trait Implementations§
impl<T> Freeze for OptionDeclarationBuilder<T>
impl<T> !RefUnwindSafe for OptionDeclarationBuilder<T>
impl<T> !Send for OptionDeclarationBuilder<T>
impl<T> !Sync for OptionDeclarationBuilder<T>
impl<T> Unpin for OptionDeclarationBuilder<T>where
T: Unpin,
impl<T> !UnwindSafe for OptionDeclarationBuilder<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
Source§impl<T> InstanceOf for T
impl<T> InstanceOf for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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