Expand description
§SmallStr
A String-like but using SmallVec internally
SmallStr<N>==SmallVec<u8, N>CloneisO(n)- Strings smaller than
Nbytes are allocated on the stack. SmallStringis 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>;
}Macros§
- format_
smallstr - like
format!
Structs§
Enums§
- Collection
Alloc Err - Error type for APIs with fallible heap allocation
Traits§
Type Aliases§
- Small
String SmallString == SmallStr<16>, on 64-bit platformssize_of::<SmallString>()==size_of::<String>()