rust/rhg/src/commands.rs
author Antoine Cezar <antoine.cezar@octobus.net>
Tue, 04 Aug 2020 16:11:23 +0200
changeset 45438 ed95ccc94333
parent 45364 5fe25f8ef5d9
child 45528 66756b34c06e
permissions -rw-r--r--
rhg: pass `ui` to `Command` `run` Allow implementation of `From<clap::ArgMatches> for Command` Differential Revision: https://phab.mercurial-scm.org/D8954

pub mod files;
pub mod root;
use crate::error::CommandError;
use crate::ui::Ui;

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