Struct rustyline::history::History [−][src]
pub struct History { /* fields omitted */ }
Expand description
Current state of the history.
Implementations
Customized constructor with:
Config::max_history_size()
,Config::history_ignore_space()
,Config::history_duplicates()
.
Return the history entry at position index
, starting from 0.
Add a new entry in the history.
Set the maximum length for the history. This function can be called even
if there is already some history, the function will make sure to retain
just the latest len
elements if the new history length value is
smaller than the amount of items already inside the history.
Like [stifle_history](http://cnswww.cns.cwru. edu/php/chet/readline/history.html#IDX11).
Save the history in the specified file.
Load the history from the specified file.
Errors
Will return Err
if path does not already exist or could not be read.
Search history (start position inclusive [0, len-1]).
Return the absolute index of the nearest history entry that matches
term
.
Return None if no entry contains term
between [start, len -1] for
forward search
or between [0, start] for reverse search.
Anchored search