inline-capacity on 64bit: 23 bytes
inline-capacity on 32bit: 11 bytes
It uses a few features (
untagged_unions, alloc, heap_api, str_mut_extras, inclusive_range) and requires a recent nightly.
It uses the highest bit of the length field to distinguish between the inlined and “normal” state. So the length is limited to
isize::MAX (2 GB on 32bit)
It could use more tests and documentation, and definitly needs a few reviews before it is safe to use in critical applications.
Most methods are identical to those from std::String