Struct bpaf::parsers::ParseCompShell
source · pub struct ParseCompShell<P> { /* private fields */ }
Available on crate feature
autocomplete
only.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>
impl<P, T> Parser<T> for ParseCompShell<P>
source§fn collect<C>(self) -> ParseCollect<Self, C, T>where
C: FromIterator<T>,
Self: Sized,
fn collect<C>(self) -> ParseCollect<Self, C, T>where
C: FromIterator<T>,
Self: Sized,
Transform parser into a collection parser Read more
source§fn optional(self) -> ParseOptional<Self>
fn optional(self) -> ParseOptional<Self>
Turn a required argument into an optional one Read more
source§fn count(self) -> ParseCount<Self, T>
fn count(self) -> ParseCount<Self, T>
Count how many times the inner parser succeeds, and return that number. Read more
source§fn last(self) -> ParseLast<Self>
fn last(self) -> ParseLast<Self>
Apply the inner parser as many times as it succeeds, return the last value Read more
source§fn parse<F, R, E>(self, f: F) -> ParseWith<T, Self, F, E, R>
fn parse<F, R, E>(self, f: F) -> ParseWith<T, Self, F, E, R>
Apply a failing transformation to a contained value Read more
source§fn map<F, R>(self, map: F) -> ParseMap<T, Self, F, R>
fn map<F, R>(self, map: F) -> ParseMap<T, Self, F, R>
Apply a pure transformation to a contained value Read more
source§fn guard<F>(self, check: F, message: &'static str) -> ParseGuard<Self, F>
fn guard<F>(self, check: F, message: &'static str) -> ParseGuard<Self, F>
Validate or fail with a message Read more
source§fn fallback(self, value: T) -> ParseFallback<Self, T>
fn fallback(self, value: T) -> ParseFallback<Self, T>
Use this value as default if the value isn’t present on a command line Read more
source§fn fallback_with<F, E>(self, fallback: F) -> ParseFallbackWith<T, Self, F, E>
fn fallback_with<F, E>(self, fallback: F) -> ParseFallbackWith<T, Self, F, E>
Use value produced by this function as default if the value isn’t present Read more
source§fn hide(self) -> ParseHide<Self>
fn hide(self) -> ParseHide<Self>
Ignore this parser during any sort of help generation Read more
source§fn hide_usage(self) -> ParseUsage<Self>
fn hide_usage(self) -> ParseUsage<Self>
Ignore this parser when generating a usage line Read more
source§fn custom_usage<M>(self, usage: M) -> ParseUsage<Self>
fn custom_usage<M>(self, usage: M) -> ParseUsage<Self>
Customize how this parser looks like in the usage line
source§fn group_help<M: Into<Doc>>(self, message: M) -> ParseGroupHelp<Self>
fn group_help<M: Into<Doc>>(self, message: M) -> ParseGroupHelp<Self>
Attach a help message to a complex parser Read more
source§fn with_group_help<F>(self, f: F) -> ParseWithGroupHelp<Self, F>
fn with_group_help<F>(self, f: F) -> ParseWithGroupHelp<Self, F>
source§fn complete_shell(self, op: ShellComp) -> ParseCompShell<Self>
fn complete_shell(self, op: ShellComp) -> ParseCompShell<Self>
Static shell completion Read more
source§fn to_options(self) -> OptionParser<T>
fn to_options(self) -> OptionParser<T>
Auto Trait Implementations§
impl<P> Freeze for ParseCompShell<P>where
P: Freeze,
impl<P> RefUnwindSafe for ParseCompShell<P>where
P: RefUnwindSafe,
impl<P> Send for ParseCompShell<P>where
P: Send,
impl<P> Sync for ParseCompShell<P>where
P: Sync,
impl<P> Unpin for ParseCompShell<P>where
P: Unpin,
impl<P> UnwindSafe for ParseCompShell<P>where
P: UnwindSafe,
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