1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![deny(missing_docs)]

/// Possible commands that can be generated by the `afrim-preprocessor`.
#[derive(Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Command {
    /// Request to commit a text.
    CommitText(String),
    /// Request to pause the listener.
    Pause,
    /// Request to resume the listener.
    Resume,
    /// Request to delete the last character.
    Delete,
    /// Request to clean the previous delete operation.
    ///
    /// Useful by example in case that a key has been pressed, and we want to ensure
    /// that it has been released before continuing.
    CleanDelete,
}