pub type ZeroCopyStr<'a> = Cow<'a, str>;Expand description
String pool for deduplicating common strings during parsing Zero-copy string wrapper Zero-copy string wrapper that borrows when possible
This avoids allocating strings when we can reference the source data directly. Falls back to owned strings when necessary (e.g., escape processing).
Aliased Type§
pub enum ZeroCopyStr<'a> {
Borrowed(&'a str),
Owned(String),
}