#[non_exhaustive]
pub enum Subcommand {
Show 22 variants Build(Build), Clippy(Clippy), Dist(Dist), DistArchive(DistArchive), DistBuild(DistBuild), DistBuildBin(DistBuildBin), DistBuildCompletion(DistBuildCompletion), DistBuildDoc(DistBuildDoc), DistBuildLicense(DistBuildLicense), DistBuildMan(DistBuildMan), DistBuildReadme(DistBuildReadme), DistClean(DistClean), Doc(Doc), Docsrs(Docsrs), Exec(Exec), Fmt(Fmt), Lint(Lint), PreRelease(PreRelease), SyncRdme(SyncRdme), Test(Test), Tidy(Tidy), Udeps(Udeps),
}
Expand description

Subcommand definition for cargo xtask command.

cargo-xtask(1)

cargo-xtask 
Rust project automation command

USAGE:
    cargo xtask [OPTIONS] [SUBCOMMAND]

OPTIONS:
    -h, --help       Print help information
    -q, --quiet      Less output per occurrence
    -v, --verbose    More output per occurrence

SUBCOMMANDS:
    build                    `cargo build` with options useful for testing and continuous
                                 integration
    clippy                   `cargo clippy` with options useful for tesing and continuous
                                 integration
    dist                     Build the artifacs and create the archive file for distribution
    dist-archive             Create the archive file for distribution
    dist-build               Build all artifacts for distribution
    dist-build-bin           Build the release binaries for distribution
    dist-build-completion    Build the shell completion files for distribution
    dist-build-doc           Build the documentation for distribution
    dist-build-license       Build the license files for distribution
    dist-build-man           Build the man pages for distribution
    dist-build-readme        Build the readme files for distribution
    dist-clean               Remove the artifacts and archives for distribution
    doc                      `cargo doc` with options useful for testing and continuous
                                 integration
    docsrs                   `cargo doc` with docs.rs specific options
    exec                     Run commands on all workspaces in the current directory and
                                 subdirectories
    fmt                      `cargo fmt` with options useful for testing and continuous
                                 integration
    help                     Print this message or the help of the given subcommand(s)
    lint                     Run lint commands at once
    pre-release              Run pre-release checks
    sync-rdme                `cargo sync-rdme` with options useful for testing and continuous
                                 integration
    test                     `cargo test` with options useful for testing and continuous
                                 integration
    tidy                     Fix the package problems
    udeps                    `cargo udeps` with options useful for testing and continuous
                                 integration

Examples

You can use this struct to define a subcommand of your application:

use cli_xtask::{clap, config::Config, subcommand::Subcommand, Result};

#[derive(Debug, clap::Parser)]
struct App {
    #[clap(subcommand)]
    subcommand: Subcommand,
}

impl App {
    pub fn run(&self, config: &Config) -> Result<()> {
        self.subcommand.run(config)
    }
}

You can mix the subcommands defined in this enum with your own subcommands:

use cli_xtask::{clap, config::Config, Result};

#[derive(Debug, clap::Parser)]
struct App {
    #[clap(subcommand)]
    subcommand: YourOwnSubcommand,
}

#[derive(Debug, clap::Subcommand)]
enum YourOwnSubcommand {
    #[clap(flatten)]
    Predefined(cli_xtask::subcommand::Subcommand),
    Foo,
    Bar,
}

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Build(Build)

Available on crate feature subcommand-build only.

cargo build with options useful for testing and continuous integration.

Clippy(Clippy)

Available on crate feature subcommand-clippy only.

cargo clippy with options useful for tesing and continuous integration.

Dist(Dist)

Available on crate feature subcommand-dist only.

Build the artifacs and create the archive file for distribution.

DistArchive(DistArchive)

Available on crate feature subcommand-dist-archive only.

Create the archive file for distribution.

DistBuild(DistBuild)

Available on crate feature subcommand-dist-build-* only.

Build all artifacts for distribution.

DistBuildBin(DistBuildBin)

Available on crate feature subcommand-dist-build-bin only.

Build the release binaries for distribution.

DistBuildCompletion(DistBuildCompletion)

Available on crate feature subcommand-dist-build-completion only.

Build the shell completion files for distribution.

DistBuildDoc(DistBuildDoc)

Available on crate feature subcommand-dist-build-doc only.

Build the documentation for distribution.

DistBuildLicense(DistBuildLicense)

Available on crate feature subcommand-dist-build-license only.

Build the license files for distribution.

DistBuildMan(DistBuildMan)

Available on crate feature subcommand-dist-build-man only.

Build the man pages for distribution.

DistBuildReadme(DistBuildReadme)

Available on crate feature subcommand-dist-build-readme only.

Build the readme files for distribution.

DistClean(DistClean)

Available on crate feature subcommand-dist-clean only.

Remove the artifacts and archives for distribution.

Doc(Doc)

Available on crate feature subcommand-doc only.

cargo doc with options useful for testing and continuous integration.

Docsrs(Docsrs)

Available on crate feature subcommand-docsrs only.

cargo doc with docs.rs specific options.

Exec(Exec)

Available on crate feature subcommand-exec only.

Run commands on all workspaces in the current directory and subdirectories.

Fmt(Fmt)

Available on crate feature subcommand-fmt only.

cargo fmt with options useful for testing and continuous integration.

Lint(Lint)

Available on crate feature subcommand-lint only.

Run lint commands at once.

PreRelease(PreRelease)

Available on crate feature subcommand-pre-release only.

Run pre-release checks.

SyncRdme(SyncRdme)

Available on crate feature subcommand-syncrdme only.

cargo sync-rdme with options useful for testing and continuous integration.

Test(Test)

Available on crate feature subcommand-test only.

cargo test with options useful for testing and continuous integration.

Tidy(Tidy)

Available on crate feature subcommand-tidy only.

Fix the package problems.

Udeps(Udeps)

Available on crate feature subcommand-udeps only.

cargo udeps with options useful for testing and continuous integration.

Implementations

Runs the subcommand specified by the command line arguments.

Trait Implementations

Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Runs the command or subcommand.
Converts the Box<dyn Run> to Box<dyn Any>.
Converts the &dyn Run trait object to a concrete type.
Converts the &dyn Run trait object to a mutable concrete type.
Returns the subcommands that this command will run.
Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Test whether Self can parse a specific subcommand

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Set the foreground color generically Read more
Set the background color generically. Read more
Change the foreground color to black
Change the background color to black
Change the foreground color to red
Change the background color to red
Change the foreground color to green
Change the background color to green
Change the foreground color to yellow
Change the background color to yellow
Change the foreground color to blue
Change the background color to blue
Change the foreground color to magenta
Change the background color to magenta
Change the foreground color to purple
Change the background color to purple
Change the foreground color to cyan
Change the background color to cyan
Change the foreground color to white
Change the background color to white
Change the foreground color to the terminal default
Change the background color to the terminal default
Change the foreground color to bright black
Change the background color to bright black
Change the foreground color to bright red
Change the background color to bright red
Change the foreground color to bright green
Change the background color to bright green
Change the foreground color to bright yellow
Change the background color to bright yellow
Change the foreground color to bright blue
Change the background color to bright blue
Change the foreground color to bright magenta
Change the background color to bright magenta
Change the foreground color to bright purple
Change the background color to bright purple
Change the foreground color to bright cyan
Change the background color to bright cyan
Change the foreground color to bright white
Change the background color to bright white
Make the text bold
Make the text dim
Make the text italicized
Make the text italicized
Make the text blink
Make the text blink (but fast!)
Swap the foreground and background colors
Hide the text
Cross out the text
Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Set the foreground color to a specific RGB value.
Set the background color to a specific RGB value.
Sets the foreground color to an RGB value.
Sets the background color to an RGB value.
Apply a runtime-determined style
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more