serialtui 0.1.3

A TUI environment specific to serial connections
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub struct DefaultHint {
    pub hint: String,
    pub complete_up_to: usize,
}

impl rustyline::hint::Hint for DefaultHint {
    fn display(&self) -> &str {
        self.hint.as_str()
    }

    fn completion(&self) -> Option<&str> {
        if self.complete_up_to > 0 {
            Some(&self.hint[..self.complete_up_to])
        } else {
            None
        }
    }
}