Skip to main content

quote_string

Function quote_string 

Source
pub fn quote_string(s: &str) -> Result<String>
Expand description

Quote a GQL string literal: rejects ASCII control characters, escapes backslash then single-quote, and wraps the result in single quotes.

ยงErrors

Returns Error::InvalidString if s contains any character < 0x20 or 0x7f (DEL).