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

A line composed of text segments. Accumulates changes until applied by its parent Interface. May be obtained from the Interface API.

Implementations

This line’s unique identifier.

This line’s text segment identifiers. Reflects the latest state, even if staged changes have not yet been applied to the interface.

This line’s text segments. Reflects the latest state, even if staged changes have not yet been applied to the interface.

Retrieves several segment references by their identifiers.

Retrieves a segment reference by its identifier.

Retrieves a mutable segment reference by its identifier.

Determines the specified segment’s index in this line.

Appends a new text segment to this line. The text segment addition will be staged until changes are applied for this line’s Interface. Note that the returned segment may have other changes staged against it for the same update.

Inserts a new text segment in this line at a specified index. The segment insertion will be staged until changes are applied for this line’s Interface. Note that the returned segment may have other changes staged against it for the same update.

Removes a text segment with the specified identifier from this line. The segment removal will be staged until changes are applied for this line’s Interface.

Removes a text segment from this line at the specified index. The segment removal will be staged until changes are applied for this line’s Interface.

Whether this line or its text segments have any staged changes.

Trait Implementations

Formats the value using the given formatter. 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 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.