Skip to main content

push_class

Function push_class 

Source
pub fn push_class(out: &mut String, name: &str, opts: &Emit)
Expand description

A prefixed class name, written into a buffer the caller already has.

The form the emitters use, and the reason it exists is escape_into’s: every class on every element went through a format! before 0.40.0, including the default case where the prefix is empty and the answer is the argument. A described table row carried roughly eighty transient allocations, and this and the escaper were most of them.

class stays for callers holding a name rather than a buffer.