Struct datafusion_rustyline::history::History[][src]

pub struct History { /* fields omitted */ }

Current state of the history.

Methods

impl History
[src]

Return the history entry at position index, starting from 0.

Return the last history entry (i.e. previous command)

Add a new entry in the history.

Return the number of entries in the history.

Return true if the history has no entry.

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.

Clear history

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

Important traits for Iter<'a>

Return a forward iterator.

Trait Implementations

impl Default for History
[src]

Returns the "default value" for a type. Read more

impl Index<usize> for History
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<'a> IntoIterator for &'a History
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Important traits for Iter<'a>

Creates an iterator from a value. Read more

Auto Trait Implementations

impl Send for History

impl Sync for History