blob: 647ad3cfc153ba322a0df4a2db4fb10ad71ff303 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
use crate::config::AppKeyMapping;
use crate::context::AppContext;
use crate::error::JoshutoResult;
use crate::ui::AppBackend;
pub trait AppExecute {
fn execute(
&self,
context: &mut AppContext,
backend: &mut AppBackend,
keymap_t: &AppKeyMapping,
) -> JoshutoResult;
}
pub trait NumberedExecute {
fn numbered_execute(
&self,
number_prefix: usize,
context: &mut AppContext,
backend: &mut AppBackend,
keymap_t: &AppKeyMapping,
) -> JoshutoResult;
}
pub trait InteractiveExecute {
fn interactive_execute(&self, context: &mut AppContext);
}
pub trait AppCommand: AppExecute + std::fmt::Display + std::fmt::Debug {
fn command(&self) -> &'static str;
}
pub trait CommandComment {
fn comment(&self) -> &'static str;
}
|