MCPcopy Create free account
hub / github.com/apache/fory / rust_string_literal

Method rust_string_literal

compiler/fory_compiler/generators/rust.py:1225–1227  ·  view source on GitHub ↗
(self, value: str)

Source from the content-addressed store, hash-verified

1223 return self.schema.get_type(type_name)
1224
1225 def rust_string_literal(self, value: str) -> str:
1226 escaped = value.replace("\\", "\\\\").replace('"', '\\"')
1227 return f'"{escaped}"'
1228
1229 def generate_debug_impl(self, message: Message) -> List[str]:
1230 """Generate a Debug impl that avoids recursive ref expansion."""

Callers 3

generate_debug_implMethod · 0.95

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected