pub trait History: Send {
    fn append(&mut self, entry: &str);
fn iter_chronologic(&self) -> Iter<'_, String>;
fn back(&mut self);
fn forward(&mut self);
fn string_at_cursor(&self) -> Option<String>;
fn set_navigation(&mut self, navigation: HistoryNavigationQuery);
fn get_navigation(&self) -> HistoryNavigationQuery;
fn query_entries(&self, search: &str) -> Vec<String>;
fn max_values(&self) -> usize; }
Expand description

Interface of a history datastructure that supports stateful navigation via HistoryNavigationQuery.

Required methods

Append entry to the history, if capacity management is part of the implementation may perform that as well

Chronologic interaction over all entries present in the history

This moves the cursor backwards respecting the navigation query that is set

  • Results in a no-op if the cursor is at the initial point

This moves the cursor forwards respecting the navigation-query that is set

  • Results in a no-op if the cursor is at the latest point

Returns the string (if present) at the cursor

Set a new navigation mode for search based on input query defined in HistoryNavigationQuery

By current convention, resets the position in the stateful browsing to the default.

Poll the current HistoryNavigationQuery mode

Query the values in the history entries

Max number of values that can be queried from the history

Implementors