afrim_preprocessor/message.rs
1#![deny(missing_docs)]
2
3/// Possible commands that can be generated by the `afrim-preprocessor`.
4#[derive(Clone, Debug, Eq, PartialEq)]
5#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6pub enum Command {
7 /// Request to commit a text.
8 CommitText(String),
9 /// Request to pause the listener.
10 Pause,
11 /// Request to resume the listener.
12 Resume,
13 /// Request to delete the last character.
14 Delete,
15 /// Request to clean the previous delete operation.
16 ///
17 /// Useful by example in case that a key has been pressed, and we want to ensure
18 /// that it has been released before continuing.
19 CleanDelete,
20}