view rust/rhg/src/commands.rs @ 46484:a6e4e4650bac

rhg: Parse system and user configuration at program start … and pass it around up to `Repo::find` Differential Revision: https://phab.mercurial-scm.org/D9962
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 04 Feb 2021 13:17:55 +0100
parents ead435aa5294
children 184e46550dc8
line wrap: on
line source

pub mod cat;
pub mod debugdata;
pub mod debugrequirements;
pub mod files;
pub mod root;
use crate::error::CommandError;
use crate::ui::Ui;
use hg::config::Config;

/// The common trait for rhg commands
///
/// Normalize the interface of the commands provided by rhg
pub trait Command {
    fn run(&self, ui: &Ui, config: &Config) -> Result<(), CommandError>;
}