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

The text line represents editable text lines.

Implementations

Returns the appropriate movement function based on parameters forward and skip.

Moves the text cursor forward by one.

Moves the text cursor back by one.

Moves the text cursor forward until the end of the current word.

Moves the text cursor back until the start of the current word.

Adds a char and updates the text cursor.

Removes the next char if it exists.

Removes the previous word if it exists.

Removes the previous char if it exists and updates the text cursor.

Removes the previous word if it exists and updates the text cursor.

Creates a new empty text line.

Creates a text line from a String.

Creates a text line from a str reference.

Checks if the line is empty.

Returns the length of the text line.

Returns the text of the text line as String.

Returns the text of the text line as a str reference.

Converts the character index to the string index.

Returns the char at the specified position.

Inserts a new char into text line.

Removes a char from text line.

Removes the specified range from the text line.

Splits a text line into two.

Joins two text lines into one.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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.