Expand description
Shared UTF-8-safe, byte-budgeted text truncation (T2).
BoundedText is the one workspace-wide utility for producing
byte-bounded, valid-UTF-8 previews of arbitrary (user- or model-derived)
strings. Production code must never byte-index-slice such strings
directly; route through this type or crate::truncate_str (the
borrowing primitive this type is built on).
Structs§
- Bounded
Text - A byte-bounded, char-boundary-safe view of a string, with exact accounting of what was kept and what was cut.