##// END OF EJS Templates
rhg: add Command trait for subcommands implemented by rhg...
Antoine Cezar -
r45515:bacf6c7e default
parent child Browse files
Show More
@@ -0,0 +1,8 b''
1 use crate::error::CommandError;
2
3 /// The common trait for rhg commands
4 ///
5 /// Normalize the interface of the commands provided by rhg
6 pub trait Command {
7 fn run(&self) -> Result<(), CommandError>;
8 }
@@ -0,0 +1,3 b''
1 /// The error type for the Command trait
2 #[derive(Debug, PartialEq)]
3 pub struct CommandError {}
@@ -1,3 +1,5 b''
1 mod commands;
2 mod error;
1 3 mod exitcode;
2 4
3 5 fn main() {
General Comments 0
You need to be logged in to leave comments. Login now