Expand description
Small string optimization with stack allocation for short strings.
Str stores strings up to 23 bytes inline, avoiding heap allocation for
typical short strings. Longer strings use reference-counted heap storage
with O(1) cloning.
Structs§
- Str
- A
Stris a string type that has the following properties: - StrMut
- Mutable, growable counterpart of
Str: same inline layout for strings up to 23 bytes, heap-backed above.
Enums§
- CowStr
- A clone-on-write smart pointer for strings with small string optimization.
Traits§
- IntoStr
- Convert value to
Str/StrMutusingfmt::Display, potentially without allocating. - StrExt
- Extension trait for
strto provide_strversions of methods that return an allocatedString.
Type Aliases§
- Utf8
Error - An error type for UTF-8 validation.
- Utf8
Error Mut - An error type for UTF-8 validation.