Fallible protocol
std/fallible.vyrn, line 16Used in the guide: Errors: panic, Fallible, ?Run it in the playgroundprotocol Fallible { type Output fn isSuccess(self) -> Bool fn success(self) -> Output }
Type to search, or try , or .
1 export, from std/fallible.vyrn.
Fallible: the protocol ? resolves through for a type that is not Option or Result.
x? returns the whole sum it was given, byte for byte, into a function of the same type. So the protocol answers only which side a value is on and how to read the success payload; any number of failing variants propagate intact.
impl Fallible for Http { type Output = Body fn isSuccess(self) -> Bool { .. } fn success(self) -> Body { .. } // total: `panic` on the failing arms }
? calls success only after isSuccess answered true.
The import graph shows the whole library.
protocol Fallible { type Output fn isSuccess(self) -> Bool fn success(self) -> Output }
This module carries no test block of its own.
2 programs in examples/ import this module. Each runs as WebAssembly and as a native binary.