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

Method fmt

crates/environ/src/string_pool.rs:52–71  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

50
51impl fmt::Debug for StringPool {
52 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
53 struct Strings<'a>(&'a StringPool);
54 impl fmt::Debug for Strings<'_> {
55 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
56 f.debug_map()
57 .entries(
58 self.0
59 .strings
60 .iter()
61 .enumerate()
62 .map(|(i, s)| (Atom::new(i), s)),
63 )
64 .finish()
65 }
66 }
67
68 f.debug_struct("StringPool")
69 .field("strings", &Strings(self))
70 .finish()
71 }
72}
73
74impl TryClone for StringPool {

Callers

nothing calls this directly

Calls 8

StringsClass · 0.85
newFunction · 0.50
finishMethod · 0.45
entriesMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
fieldMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected