1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::messages::Commands;

/// Result of a single step of the loop

#[derive(Debug)]
pub enum StepResult<'a> {
    /// A status was produced

    Status(Status<'a>),
    /// Nothing was produced, try again

    Nothing,
}

/// Status produced by the loop

#[derive(Debug)]
pub enum Status<'a> {
    /// A message was produced

    Message(Commands<'a>),
    /// The user quit the loop

    Quit,
    /// Loop run to completion

    Eof,
}