Trait cli_xtask::Run

source ·
pub trait Run: Any {
    // Required methods
    fn run(&self, config: &Config<'_>) -> Result<()>;
    fn into_any(self: Box<Self>) -> Box<dyn Any>;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;

    // Provided method
    fn to_subcommands(&self) -> Option<SubcommandRun> { ... }
}
Expand description

Runs the command or subcommand.

Required Methods§

source

fn run(&self, config: &Config<'_>) -> Result<()>

Runs the command or subcommand.

source

fn into_any(self: Box<Self>) -> Box<dyn Any>

Converts the Box<dyn Run> to Box<dyn Any>.

source

fn as_any(&self) -> &dyn Any

Converts the &dyn Run trait object to a concrete type.

source

fn as_any_mut(&mut self) -> &mut dyn Any

Converts the &dyn Run trait object to a mutable concrete type.

Provided Methods§

source

fn to_subcommands(&self) -> Option<SubcommandRun>

Returns the subcommands that this command will run.

Implementors§

source§

impl Run for Subcommand

source§

impl Run for Build

Available on crate feature subcommand-build only.
source§

impl Run for Clippy

Available on crate feature subcommand-clippy only.
source§

impl Run for Dist

Available on crate feature subcommand-dist only.
source§

impl Run for DistArchive

Available on crate feature subcommand-dist-archive only.
source§

impl Run for DistBuild

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

impl Run for DistBuildBin

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

impl Run for DistBuildCompletion

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

impl Run for DistBuildDoc

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

impl Run for DistBuildLicense

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

impl Run for DistBuildMan

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

impl Run for DistBuildReadme

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

impl Run for DistClean

Available on crate feature subcommand-dist-clean only.
source§

impl Run for Doc

Available on crate feature subcommand-doc only.
source§

impl Run for Docsrs

Available on crate feature subcommand-docsrs only.
source§

impl Run for Exec

Available on crate feature subcommand-exec only.
source§

impl Run for Fmt

Available on crate feature subcommand-fmt only.
source§

impl Run for Lint

Available on crate feature subcommand-lint only.
source§

impl Run for PreRelease

Available on crate feature subcommand-pre-release only.
source§

impl Run for SyncRdme

Available on crate feature subcommand-sync-rdme only.
source§

impl Run for Test

Available on crate feature subcommand-test only.
source§

impl Run for Tidy

Available on crate feature subcommand-tidy only.
source§

impl Run for Udeps

Available on crate feature subcommand-udeps only.