minijinja::value

Function intern

Source
pub fn intern(s: &str) -> Arc<str>
Expand description

Intern a string.

When the key_interning feature is in used, then MiniJinja will attempt to reuse strings in certain cases. This function can be used to utilize the same functionality. There is no guarantee that a string will be interned as there are heuristics involved for it. Additionally the string interning will only work during the template engine execution (eg: within filters etc.).

The use of this function is generally recommended against and it might become deprecated in the future.