Expand description
Attributed text: a node’s text plus range-scoped style runs and links.
This is the payload carried by PARAMETER::SET_ATTRIBUTED_TEXT (see
spec/OPCODE.md). The text is UTF-8; run/link ranges are UTF-8 byte
offsets (half-open, [start, end)). The payload is arena-backed: the
opcode references one length-prefixed entry whose bytes are produced by
AttributedString::encode.
V1 style attributes are scalar text-format properties only:
FONT_SIZE, FONT_WEIGHT, COLOR, FONT_STYLE, FONT_DESIGN,
UNDERLINE, STRIKETHROUGH. Unknown properties/types are ignored on decode
so a newer producer never breaks an older renderer.
Structs§
- Attributed
Segment - A non-overlapping slice of an
AttributedStringwith its effective attributes and link. Produced byAttributedString::segments. - Attributed
String - Text with optional style runs and links.
- LinkRun
- A range of the text that is a hyperlink.
- Style
Run - A range of the text with a set of scalar attributes.
- Text
Attribute - A single scalar text-format attribute on a range.
Enums§
- Attributed
Error - An error raised while building, encoding, or decoding attributed text.
Functions§
- is_
supported - Whether an attribute is in the v1 run vocabulary.