Struct kas_text::Text [−][src]
pub struct Text<T: FormattableText> { /* fields omitted */ }
Expand description
Text, prepared for display in a given enviroment
This struct is composed of three parts: an Environment
, a representation
of the FormattableText
being displayed, and a TextDisplay
object.
Most Functionality is implemented via the TextApi
and TextApiExt
traits.
Implementations
Construct from an environment and a text model
This struct must be made ready for usage by calling Text::prepare
.
Construct from a default environment (single-line) and text
The environment is default-constructed, with line-wrapping
turned off (see Environment::flags
doc).
Construct from a default environment (multi-line) and text
The environment is default-constructed (line-wrap on).
Clone the formatted text
Set the text
One must call Text::prepare
afterwards and may wish to inspect its
return value to check the size allocation meets requirements.
Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<T> RefUnwindSafe for Text<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Text<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Cast to integer, truncating Read more
Cast to the nearest integer Read more
Cast the floor to an integer Read more
Try converting to integer with truncation Read more
Try converting to the nearest integer Read more
Try converting the floor to an integer Read more
Try convert the ceiling to an integer Read more