flatten method
Flattens a nested Result
type value one level.
Returns:
- Ok<T, E> if this
Result
is Ok<Result<T, E>, E> - Err<T, E> if this
Result
is Err<Result<T, E>. E>
See also:
Rust: Result::flatten()
Implementation
Result<T, E> flatten() => switch (this) {
Ok(value: Result<T, E> value) => value,
Err(value: E value) => Err(value)
};