Skip to contents

[Stable]

This is useful for converting a Result to an Option i.e. to go from the possibility of an answer or details of a failure, to the possibility of an answer or nothing.

Usage

unwrap_fail_option(x, ...)

Arguments

x

A Result object i.e. a Success() or Failure() value.

...

Additional optional arguments that may be used by specific methods.

Value

Some(x) in the case of a Failure where x is the unwrapped value of the Failure, or Nothing() in the case of a Success.

See also