Expand description
A string type that stores strings inline when small.
InlineStr
is a string type built on top of inline-array
that can store small strings
directly inline to avoid heap allocation, falling back to heap allocation for larger strings.
This crate doesn’t do any of the heavy lifting, if you want to better understand how it works its recommended to read through inline-array’s docs and source code.
§Examples
use inline_str::InlineStr;
let s = InlineStr::from("hello");
assert_eq!(s, "hello");
§Features
- serde: Enable serialization/deserialization support with serde
Structs§
- Inline
Str - Immutable stack-inlinable string type that can be cheaply cloned and shared.