1 unstable release
0.1.0 | Apr 22, 2024 |
---|
#2284 in Algorithms
54KB
769 lines
SmallStr
A String
-like but using SmallVec
internally
SmallStr<N>
==SmallVec<u8, N>
Clone
isO(n)
- Strings smaller than
N
bytes are allocated on the stack. SmallString
is an alias forSmallStr<16>
andsize_of::<SmallString>() == size_of::<String>()
on 64-bit platform
Macro
macro format_smallstr!
like format!
Traits
ToSmallStr
like ToString
, convert T: Display
to SmallStr
pub trait ToSmallStr {
fn to_smallstr<const N: usize>(&self) -> SmallStr<N>;
}
Dependencies
~105–265KB