rust/rhg/src/commands.rs
author Antoine Cezar <antoine.cezar@octobus.net>
Fri, 05 Jun 2020 09:01:35 +0200
changeset 45049 513b3ef277a3
parent 44982 bacf6c7ef01b
child 45361 47997afadf08
permissions -rw-r--r--
rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root` The println macro is not used to avoid string usage. Dealing only with bytes allows us to be compatible with any encoding and not just UTF8. Later on, format macro will be made to have more readable code. Differential Revision: https://phab.mercurial-scm.org/D8612

pub mod root;
use crate::error::CommandError;

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