Trait Run

Source
pub trait Run: Any {
    // Required method
    fn run(&self, config: &Config<'_>) -> Result<()>;

    // Provided methods
    fn to_subcommands(&self) -> Option<SubcommandRun> { ... }
    fn into_any(self: Box<Self>) -> Box<dyn Any>
       where Self: Sized { ... }
    fn as_any(&self) -> &dyn Any
       where Self: Sized { ... }
    fn as_any_mut(&mut self) -> &mut dyn Any
       where Self: Sized { ... }
}
Expand description

Runs the command or subcommand.

Required Methods§

Source

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

Runs the command or subcommand.

Provided Methods§

Source

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

Returns the subcommands that this command will run.

Source

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

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

Source

fn as_any(&self) -> &dyn Any
where Self: Sized,

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

Source

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

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

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.