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

Method display

crates/core/src/error/error.rs:1815–1826  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

1813 }
1814
1815 fn display(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1816 match self.unpack() {
1817 OomOrDynErrorRef::DynError(e) => {
1818 // Safety: invariant of this type.
1819 let vtable = unsafe { e.as_ref().vtable };
1820 // Safety: using the vtable associated with this pointer's
1821 // concrete type and the pointer is valid.
1822 unsafe { (vtable.display)(e, f) }
1823 }
1824 OomOrDynErrorRef::Oom(oom) => fmt::Display::fmt(oom, f),
1825 }
1826 }
1827
1828 fn debug(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1829 match self.unpack() {

Callers 1

fmtMethod · 0.45

Calls 3

fmtFunction · 0.85
unpackMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected