Mercurial > public > mercurial-scm > hg-stable
view rust/rhg/src/commands.rs @ 45449:ed95ccc94333
rhg: pass `ui` to `Command` `run`
Allow implementation of `From<clap::ArgMatches> for Command`
Differential Revision: https://phab.mercurial-scm.org/D8954
author | Antoine Cezar <antoine.cezar@octobus.net> |
---|---|
date | Tue, 04 Aug 2020 16:11:23 +0200 |
parents | 5fe25f8ef5d9 |
children | 66756b34c06e |
line wrap: on
line source
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>; }