Struct bpaf::parsers::ParseCompShell
source · pub struct ParseCompShell<P> { /* private fields */ }Expand description
Parser that inserts static shell completion into bpaf’s dynamic shell completion
Trait Implementations§
source§impl<P, T> Parser<T> for ParseCompShell<P>where
P: Parser<T> + Sized,
impl<P, T> Parser<T> for ParseCompShell<P>where
P: Parser<T> + Sized,
source§fn some(self, message: &'static str) -> ParseSome<Self>where
Self: Sized + Parser<T>,
fn some(self, message: &'static str) -> ParseSome<Self>where
Self: Sized + Parser<T>,
Consume one or more items from a command line Read more
source§fn optional(self) -> ParseOptional<Self>where
Self: Sized + Parser<T>,
fn optional(self) -> ParseOptional<Self>where
Self: Sized + Parser<T>,
Turn a required argument into optional one Read more
source§fn parse<F, R, E>(self, f: F) -> ParseWith<T, Self, F, E, R>where
Self: Sized + Parser<T>,
F: Fn(T) -> Result<R, E>,
E: ToString,
fn parse<F, R, E>(self, f: F) -> ParseWith<T, Self, F, E, R>where
Self: Sized + Parser<T>,
F: Fn(T) -> Result<R, E>,
E: ToString,
Apply a failing transformation to a contained value Read more
source§fn map<F, R>(self, map: F) -> ParseMap<T, Self, F, R>where
Self: Sized + Parser<T>,
F: Fn(T) -> R + 'static,
fn map<F, R>(self, map: F) -> ParseMap<T, Self, F, R>where
Self: Sized + Parser<T>,
F: Fn(T) -> R + 'static,
Apply a pure transformation to a contained value Read more
source§fn guard<F>(self, check: F, message: &'static str) -> ParseGuard<Self, F>where
Self: Sized + Parser<T>,
F: Fn(&T) -> bool,
fn guard<F>(self, check: F, message: &'static str) -> ParseGuard<Self, F>where
Self: Sized + Parser<T>,
F: Fn(&T) -> bool,
Validate or fail with a message Read more
source§fn fallback(self, value: T) -> ParseFallback<Self, T>where
Self: Sized + Parser<T>,
fn fallback(self, value: T) -> ParseFallback<Self, T>where
Self: Sized + Parser<T>,
Use this value as default if value isn’t present on a command line Read more
source§fn fallback_with<F, E>(self, fallback: F) -> ParseFallbackWith<T, Self, F, E>where
Self: Sized + Parser<T>,
F: Fn() -> Result<T, E>,
E: ToString,
fn fallback_with<F, E>(self, fallback: F) -> ParseFallbackWith<T, Self, F, E>where
Self: Sized + Parser<T>,
F: Fn() -> Result<T, E>,
E: ToString,
Use value produced by this function as default if value isn’t present Read more
source§fn hide(self) -> ParseHide<Self>where
Self: Sized + Parser<T>,
fn hide(self) -> ParseHide<Self>where
Self: Sized + Parser<T>,
Ignore this parser during any sort of help generation Read more
source§fn hide_usage(self) -> ParseHideUsage<Self>where
Self: Sized + Parser<T>,
fn hide_usage(self) -> ParseHideUsage<Self>where
Self: Sized + Parser<T>,
Ignore this parser when generating usage line Read more
source§fn group_help(self, message: &'static str) -> ParseGroupHelp<Self>where
Self: Sized + Parser<T>,
fn group_help(self, message: &'static str) -> ParseGroupHelp<Self>where
Self: Sized + Parser<T>,
Attach help message to a complex parser Read more
source§fn complete<M, F>(self, op: F) -> ParseComp<Self, F>where
M: Into<String>,
F: Fn(&T) -> Vec<(M, Option<M>)>,
Self: Sized + Parser<T>,
fn complete<M, F>(self, op: F) -> ParseComp<Self, F>where
M: Into<String>,
F: Fn(&T) -> Vec<(M, Option<M>)>,
Self: Sized + Parser<T>,
Dynamic shell completion Read more
source§fn complete_shell(self, op: ShellComp) -> ParseCompShell<Self>where
Self: Sized + Parser<T>,
fn complete_shell(self, op: ShellComp) -> ParseCompShell<Self>where
Self: Sized + Parser<T>,
Static shell completion Read more
source§fn complete_style(self, style: CompleteDecor) -> ParseCompStyle<Self>where
Self: Sized + Parser<T>,
fn complete_style(self, style: CompleteDecor) -> ParseCompStyle<Self>where
Self: Sized + Parser<T>,
Add extra annotations to completion information Read more
source§fn adjacent(self) -> ParseAdjacent<Self>where
Self: Sized + Parser<T>,
fn adjacent(self) -> ParseAdjacent<Self>where
Self: Sized + Parser<T>,
Automagically restrict the inner parser scope to accept adjacent values only Read more
source§fn anywhere(self) -> ParseAnywhere<Self>where
Self: Sized + Parser<T>,
fn anywhere(self) -> ParseAnywhere<Self>where
Self: Sized + Parser<T>,
Parse anywhere Read more