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

Method variant_error

tests/all/component_model/bindgen/results.rs:718–729  ·  view source on GitHub ↗
(&mut self, a: f64)

Source from the content-addressed store, hash-verified

716 }
717 }
718 fn variant_error(&mut self, a: f64) -> Result<f64, TrappableE3> {
719 if a == 0.0 {
720 Ok(a)
721 } else if a == 1.0 {
722 Err(imports::E3::E2(imports::E2 {
723 line: 420,
724 col: 1312,
725 }))?
726 } else {
727 Err(TrappableE3::Trap(format_err!("variant_error: trap")))
728 }
729 }
730 }
731
732 let mut linker = Linker::new(&engine);

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
TrapClass · 0.50

Tested by

no test coverage detected