unwrap
- caqtus.utils.result.unwrap(
- value: Success[T],
- caqtus.utils.result.unwrap(value: Failure[Exception]) Never
Unwrap a result when the failure case is an exception.
This function can be used to recover the wrapped value from a Success or raise the wrapped exception from a Failure.
- Parameters:
value – The result to unwrap. If the value is a Failure, its content must be an exception.
- Returns:
The value wrapped if the argument passes is a Success.
- Raises:
The exception wrapped if the argument passed is a Failure containing an –
exception. –