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

Method write

crates/literal/src/escape.rs:121–126  ·  view source on GitHub ↗
(&self, formatter: &mut impl core::fmt::Write)

Source from the content-addressed store, hash-verified

119
120impl StrRepr<'_, '_> {
121 pub fn write(&self, formatter: &mut impl core::fmt::Write) -> core::fmt::Result {
122 let quote = self.0.layout().quote.to_char();
123 formatter.write_char(quote)?;
124 self.0.write_body(formatter)?;
125 formatter.write_char(quote)
126 }
127
128 pub fn to_string(&self) -> Option<String> {
129 let mut s = String::with_capacity(self.0.layout().len?);

Callers 5

hashMethod · 0.45
unparse_fstringMethod · 0.45
unparse_tstringMethod · 0.45
to_stringMethod · 0.45
fmtMethod · 0.45

Calls 4

write_charMethod · 0.80
write_bodyMethod · 0.80
to_charMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected