Skip to main content

quote

Function quote 

Source
pub fn quote(value: impl AsRef<str>) -> String
Expand description

Wraps value in single quotes: foo becomes 'foo'.

This is the single convention for surfacing an identifier, property name, or literal inside a message. It never emits double quotes, so the rendered message survives JSON serialization without \" escaping.