Expand description
A UTF-8 string backed by SmallVec.
SmallStr<N> stores up to N bytes inline on the stack. When the string grows
beyond N bytes, it spills to a heap-allocated buffer.
§Examples
use planck_noalloc::smallstr::SmallStr;
let mut s = SmallStr::<16>::new();
s.push_str("hello");
s.push(' ');
s.push_str("world");
assert_eq!(s.as_str(), "hello world");
assert!(s.is_inline());Structs§
- From
Utf8 Error - Error returned when constructing a
SmallStrfrom invalid UTF-8 data. - Small
Str - A UTF-8 string that stores up to
Nbytes inline, spilling to the heap when exceeded.