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

A segment of text which may have formatting. Accumulates changes until applied by its parent Line. May be obtained from the Line API.

Implementations

This segment’s unique identifier.

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

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

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

Update this segment’s text. The new text will be staged until applied for this Interface.

Update this segment’s color. The new color is staged until applied for this Interface.

Clear this segment’s color. The reset is staged until applied for this Interface.

Update this segment’s styles. The new styles are staged until applied for this Interface.

Clear this segment’s styles. The reset is staged until applied for this Interface.

Whether this segment has 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.