aboutsummaryrefslogtreecommitdiff
path: root/src/action.rs
blob: 29ee079034e2e5f85c202d290627cce2f2305aa7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use serde::{Deserialize, Serialize};
use strum::Display;

/// Application-level events, distinct from [`crate::buffer::command::Command`],
/// which is what key bindings name. `Action` is what the event loop routes;
/// `Command` is what the editor executes.
#[derive(Debug, Clone, PartialEq, Eq, Display, Serialize, Deserialize)]
pub enum Action {
    Tick,
    Render,
    Resize(u16, u16),
    Suspend,
    Resume,
    Quit,
    ClearScreen,
    Error(String),
}