Extracts the error value from an Err result, or returns a default error value if it's an Ok.
Err
Ok
The type of the successful value.
The type of the error value.
The result from which to unwrap the error value.
The default error value to return if the result is Ok.
The error value if result is Err, otherwise with_default.
result
with_default
Extracts the error value from an
Err
result, or returns a default error value if it's anOk
.