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

A reference to the text content.

This can be deref’ed into a StyledString.

This keeps the content locked. Do not store this!

Methods from Deref<Target = SpannedString<Style>>

Iterates on the resolved spans.

Returns a reference to the indexed spans.

Returns a reference to the source string.

This is the non-parsed string.

Returns true if self is empty.

Returns the width taken by this string.

This is the sum of the width of each span.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

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.

Should always be Self

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.