MCPcopy Create free account
hub / github.com/dcSpark/cddl-codegen / escape_rust_str

Function escape_rust_str

src/intermediate.rs:1038–1040  ·  view source on GitHub ↗

Escape a CDDL fixed text value for safe interpolation into an emitted Rust string literal. CDDL text literals may legally contain `"` or `\`; without escaping, those emit invalid Rust (rustfmt then fails on the generated source). Plain values are unchanged.

(s: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected