[][src]Trait termwiz::lineedit::History

pub trait History {
    fn get(&self, idx: HistoryIndex) -> Option<&str>;
fn last(&self) -> Option<HistoryIndex>;
fn add(&mut self, line: &str); }

Defines the history interface for the line editor.

Required methods

fn get(&self, idx: HistoryIndex) -> Option<&str>

Lookup the line corresponding to an index.

fn last(&self) -> Option<HistoryIndex>

Return the index for the most recently added entry.

fn add(&mut self, line: &str)

Add an entry. Note that the LineEditor will not automatically call the add method.

Loading content...

Implementors

impl History for BasicHistory[src]

Loading content...