ResultException

class rusttypes.result.ResultException(inner: E)

Bases: Exception, Generic[E]

Exception that is thrown when calling Result::try_ on an Err. The inner value is the error that caused the exception. This exception is caught by the try_guard decorator. This type is not meant to be used by the user.

inner

The error that caused the exception.

Type:

E

Examples

This exception is thrown when calling Result::try_ on an Err:

>>> Err("error").try_()
Traceback (most recent call last):
    ...