Struct branchless::core::formatting::StyledStringBuilder[][src]

pub struct StyledStringBuilder { /* fields omitted */ }
Expand description

Helper to build StyledStrings by combining multiple strings (both regular Strings and StyledStrings).

Implementations

Constructor.

Append a plain-text string to the internal buffer.

Style the provided text using style, then append it to the internal buffer.

Directly append the provided StyledString to the internal buffer.

Create a new StyledString using all the components in the internal buffer.

Helper function to join a list of StyledStrings into a single StyledStrings, using the provided delimiter.

Helper function to turn a list of lines, each of which is a StyledString, into a single StyledString with a newline at the end of each line.

Trait Implementations

Returns the “default value” for a type. Read more

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.