rust/rhg/src/commands.rs
author Antoine Cezar <antoine.cezar@octobus.net>
Mon, 22 Jun 2020 15:19:35 +0530
changeset 44982 bacf6c7ef01b
child 45049 513b3ef277a3
permissions -rw-r--r--
rhg: add Command trait for subcommands implemented by rhg Normalizes the interface of the cli's commands Differential Revision: https://phab.mercurial-scm.org/D8611 Differential Revision: https://phab.mercurial-scm.org/D8648

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>;
}