MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / EnumError

Function EnumError

tests/runtime/results/leaf.go:17–23  ·  view source on GitHub ↗
(x float32)

Source from the content-addressed store, hash-verified

15}
16
17func EnumError(x float32) Result[float32, E] {
18 if x == 0.0 {
19 return Err[float32, E](EA)
20 } else {
21 return Ok[float32, E](x)
22 }
23}
24
25func RecordError(x float32) Result[float32, E2] {
26 if x == 0.0 {

Callers 2

EnumErrorMethod · 0.70
RunMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected