pub struct VecBuffer { /* private fields */ }
Expand description

VecBuffer, the default Buffer implementation

It is based on storing the text in a Vector of lines. Regex functionality is imported from the Regex crate.

Implementations

Create a new empty buffer. It is considered saved while unchanged.

Trait Implementations

Return the number of lines stored in the buffer

Get line tagged with given letter. Not found is error

Return the nearest previous/following index in the selection that contains the regex pattern

Set the matched flag on all lines matching given pattern

Get a line with the matched flag set, clearing that line’s flag

Mark a line with a letter, mark with ‘\0’ to clear

Takes a iterator over lines in strings and inserts after given index

Cut the selection from the buffer, into the clipboard

Replace selection with input

Move selection to immediately after index

Insert a copy of the selection immediately after index

Join all lines in selection into one line

Copy selected lines into clipboard

Paste the clipboard contents after given index Leave clipboard unchanged Read more

Perform regex search and replace on the selection changing pattern.0 to pattern.1 Should interpret escape sequences in both patterns. At minimum \n and \. If pattern is empty, should re-use stored pattern from previous s command Returns new end of selection, since it may delete or add lines Beware that it may delete the whole selection just as ‘c’ Read more

Read to the buffer from given path If index is None replaces current buffer with read lines Else inserts read lines after given index Return number of lines read Read more

Write the buffer to given path

Returns true if no changes have been made since last saving

Return the given selection without any formatting

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.