Crate untry

Source
Expand description

This is a collection of macros that work the “opposite” way of the ? operator. That is, they early-return if the input is successful, and evaluate to the error (if there is any).

This crate is no_std-compatible. There is a nightly-exclusive item guarded behing the nightly feature.

Macros§

untry_ok_to_some
Like untry_result, but it swaps Ok for Some.
untry_option
The opposite of ? for Option.
untry_residualnightly
Almost the opposite of ? for arbitrary Try types.
untry_result
The opposite of ? for Result.