use super::State;
#[derive(Debug, Eq, PartialEq, Copy, Clone, PartialOrd, Hash)]
pub enum Cmd {
Type(char),
Move(Direction),
Scroll(Direction),
GoTo(Position),
Submit,
Delete,
Cancel,
Toggle,
Change,
Tick,
Custom(&'static str),
None,
}
#[derive(Debug, Eq, PartialEq, Copy, Clone, PartialOrd, Hash)]
pub enum Direction {
Down,
Left,
Right,
Up,
}
#[derive(Debug, Eq, PartialEq, Copy, Clone, PartialOrd, Hash)]
pub enum Position {
Begin,
End,
At(usize),
}
#[derive(Debug, PartialEq, Clone)]
#[allow(clippy::large_enum_variant)]
pub enum CmdResult {
Changed(State),
Submit(State),
Invalid(Cmd),
Custom(&'static str),
Batch(Vec<CmdResult>),
None,
}