MCPcopy Index your code
hub / github.com/RustPython/RustPython / to_string

Method to_string

crates/literal/src/escape.rs:128–132  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

126 }
127
128 pub fn to_string(&self) -> Option<String> {
129 let mut s = String::with_capacity(self.0.layout().len?);
130 self.write(&mut s).unwrap();
131 Some(s)
132 }
133}
134
135impl core::fmt::Display for StrRepr<'_, '_> {

Callers 15

evalFunction · 0.80
bench_rustpython_codeFunction · 0.80
criterion_benchmarkFunction · 0.80
bench_rustpython_codeFunction · 0.80
run_fileFunction · 0.80
mainFunction · 0.80
parse_python_fileFunction · 0.80
panic_hookFunction · 0.80
inject_moduleMethod · 0.80
inject_js_moduleMethod · 0.80
py_err_to_js_errFunction · 0.80
js_py_typeerrorFunction · 0.80

Calls 4

SomeClass · 0.50
layoutMethod · 0.45
unwrapMethod · 0.45
writeMethod · 0.45