Struct Bash

Source
pub struct Bash;
Expand description

Generate bash completion file

Trait Implementations§

Source§

impl Generator for Bash

Source§

fn file_name(name: &str) -> String

Returns the file name that is created when this generator is called during compile time. Read more
Source§

fn generate(app: &App<'_>, buf: &mut dyn Write)

Generates output out of clap::App. Read more
Source§

fn all_subcommands(app: &App<'_>) -> Vec<(String, String)>

Gets all subcommands including child subcommands in the form of ("name", "bin_name"). Read more
Source§

fn find_subcommand_with_path<'help, 'app>( p: &'app App<'help>, path: Vec<&str>, ) -> &'app App<'help>

Finds the subcommand clap::App from the given clap::App with the given path. Read more
Source§

fn subcommands(p: &App<'_>) -> Vec<(String, String)>

Gets subcommands of clap::App in the form of ("name", "bin_name"). Read more
Source§

fn shorts_and_visible_aliases(p: &App<'_>) -> Vec<char>

Gets all the short options, their visible aliases and flags of a clap::App. Includes h and V depending on the clap::AppSettings.
Source§

fn longs_and_visible_aliases(p: &App<'_>) -> Vec<String>

Gets all the long options, their visible aliases and flags of a clap::App. Includes help and version depending on the clap::AppSettings.
Source§

fn flags<'help>(p: &App<'help>) -> Vec<Arg<'help>>

Gets all the flags of a clap::App. Includes help and version depending on the clap::AppSettings.

Auto Trait Implementations§

§

impl Freeze for Bash

§

impl RefUnwindSafe for Bash

§

impl Send for Bash

§

impl Sync for Bash

§

impl Unpin for Bash

§

impl UnwindSafe for Bash

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.