pub struct CompletionGenerator { /* private fields */ }Expand description
Generate completions.
Implementations
impl CompletionGenerator
impl CompletionGenerator
pub fn run<App>(self) -> Result<(), Error>where
App: CommandFactory,
pub fn run<App>(self) -> Result<(), Error>where
App: CommandFactory,
Run the generator.
pub fn main<App>() -> ExitCodewhere
App: CommandFactory,
pub fn main<App>() -> ExitCodewhere
App: CommandFactory,
The program that generates shell completions.
Trait Implementations
impl Args for CompletionGenerator
impl Args for CompletionGenerator
fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the
ArgGroup::id for this set of argumentsfn augment_args(__clap_app: Command) -> Command
fn augment_args(__clap_app: Command) -> Command
fn augment_args_for_update(__clap_app: Command) -> Command
fn augment_args_for_update(__clap_app: Command) -> Command
impl CommandFactory for CompletionGenerator
impl CommandFactory for CompletionGenerator
impl Debug for CompletionGenerator
impl Debug for CompletionGenerator
impl FromArgMatches for CompletionGenerator
impl FromArgMatches for CompletionGenerator
fn from_arg_matches(
__clap_arg_matches: &ArgMatches
) -> Result<CompletionGenerator, Error<RichFormatter>>
fn from_arg_matches(
__clap_arg_matches: &ArgMatches
) -> Result<CompletionGenerator, Error<RichFormatter>>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<CompletionGenerator, Error<RichFormatter>>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<CompletionGenerator, Error<RichFormatter>>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error<RichFormatter>>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error<RichFormatter>>
Assign values from
ArgMatches to self.fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error<RichFormatter>>
fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error<RichFormatter>>
Assign values from
ArgMatches to self.impl Parser for CompletionGenerator
impl Parser for CompletionGenerator
fn parse() -> Self
fn parse() -> Self
Parse from
std::env::args_os(), exit on errorfn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
Parse from
std::env::args_os(), return Err on error.fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, exit on error
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, return Err on error.
fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, exit on error
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, return Err on error.
Auto Trait Implementations
impl RefUnwindSafe for CompletionGenerator
impl Send for CompletionGenerator
impl Sync for CompletionGenerator
impl Unpin for CompletionGenerator
impl UnwindSafe for CompletionGenerator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<App> CommandFactoryExtra for Appwhere
App: CommandFactory,
impl<App> CommandFactoryExtra for Appwhere
App: CommandFactory,
fn get_completion<Completion, Name>(name: Name, shell: Shell) -> Completionwhere
Completion: Write + Default,
Name: Into<String>,
fn get_completion<Completion, Name>(name: Name, shell: Shell) -> Completionwhere
Completion: Write + Default,
Name: Into<String>,
Get completion content.
fn get_completion_string(
name: impl Into<String>,
shell: Shell
) -> Result<String, Utf8Error>
fn get_completion_string(
name: impl Into<String>,
shell: Shell
) -> Result<String, Utf8Error>
Get completion string.
fn generate_completion(generator: CompletionGenerator) -> Result<(), Error>
fn generate_completion(generator: CompletionGenerator) -> Result<(), Error>
Generate a shell completion file.
fn run_completion_generator() -> ExitCode
fn run_completion_generator() -> ExitCode
Create and run the completion generator.
impl<X> Pipe for X
impl<X> Pipe for X
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read morefn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read morefn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read morefn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait [DerefMut<Target = Param>]. Read morefn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Returnwhere
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read morefn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Returnwhere
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read more