Skip to main content

element_needs_escaping

Function element_needs_escaping 

Source
pub fn element_needs_escaping(elem: &[u8]) -> bool
Expand description

Reports whether elem would be quoted by the list, map or record element escaper.

This is the union of the three, because one rendering can be nested in any of them. Returning Nestable::Yes is a promise that this is false, so a formatter’s oracle can check the promise rather than restate the rules.