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: putting every class on every element through a format! allocates even in the default case, where the prefix is empty and the answer is the argument. A described table row carries roughly eighty transient allocations that way, and this and the escaper are most of them.

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