Expand description
Rich text module - the core text manipulation type.
This module provides the Text type which represents styled terminal text,
along with supporting types Span, Lines, and related enums.
Port of Python’s rich/text.py.
Re-exports§
pub use enums::JustifyMethod;pub use enums::OverflowMethod;
Modules§
- enums
- Text enums for justification and overflow handling.
Structs§
- Lines
- A collection of
Textlines, typically produced by wrapping or splitting. - Span
- A styled range within a
Textobject. - Text
- Rich text with styles, spans, and formatting metadata.
Enums§
- Text
OrStr - Either a string slice or a
Textreference, for use withText::append. - Text
Part - A building block for
Text::assemble, representing one segment of text.
Functions§
- strip_
control_ codes - Strip control codes from text (Bell, Backspace, VT, FF, CR).