Skip to main content

InternedStr

Type Alias InternedStr 

Source
pub type InternedStr = SmolStr;
Expand description

A tag or attribute name read from the wire format’s interned-string pool. The same handful of names (pkg, name, version, …) repeat across every element in a typical document, so back-reference clones need to be cheap.

InternedStr is smol_str::SmolStr: strings up to 23 bytes are stored inline (clone is a stack copy), longer ones fall back to a reference-counted Arc<str> (clone is a refcount bump) — either way, no allocation on clone.

Aliased Type§

pub struct InternedStr(/* private fields */);