MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / write_str

Method write_str

crates/core/src/error/macros.rs:330–341  ·  view source on GitHub ↗
(&mut self, s: &str)

Source from the content-addressed store, hash-verified

328
329 impl fmt::Write for Formatter {
330 fn write_str(&mut self, s: &str) -> fmt::Result {
331 match self.message.try_reserve(s.len()) {
332 Ok(()) => {
333 self.message.push_str(s);
334 Ok(())
335 }
336 Err(_) => {
337 self.oom = Some(OutOfMemory::new(self.message.len() + s.len()));
338 Err(fmt::Error)
339 }
340 }
341 }
342 }
343
344 impl Error {

Callers 15

expectingMethod · 0.45
emitMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45

Calls 5

OkFunction · 0.85
try_reserveMethod · 0.80
newFunction · 0.50
lenMethod · 0.45
push_strMethod · 0.45

Tested by 1

fmtMethod · 0.36