Struct liner::History [] [src]

pub struct History {
    pub buffers: VecDeque<Buffer>,
    pub append_duplicate_entries: bool,
    // some fields omitted
}

Structure encapsulating command history

Fields

Vector of buffers to store history in

Methods

impl History
[src]

[src]

It's important to execute this function before exiting your program, as it will ensure that all history data has been written to the disk.

[src]

Create new History structure.

[src]

Number of items in history.

[src]

Add a command to the history buffer and remove the oldest commands when the max history size has been met. If writing to the disk is enabled, this function will be used for logging history to the designated history file.

[src]

Go through the history and try to find a buffer which starts the same as the new buffer given to this function as argument.

[src]

Get the history file name.

[src]

Set history file name. At the same time enable history.

[src]

Set maximal number of buffers stored in memory

[src]

Set maximal number of entries in history file

[src]

Load history from given file name

Trait Implementations

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

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl Index<usize> for History
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for History
[src]

[src]

Performs the mutable indexing (container[index]) operation.