and<U> method
Returns a Result
value as Err<U, E> if this Result
is Err<T, E>,
otherwise returns other
.
See also:
Rust: Result::and()
Implementation
Result<U, E> and<U>(Result<U, E> other) {
return switch (this) {
Ok() => other,
Err(:E e) => Err(e),
};
}