and<U> method

Result<U, E> and<U>(
  1. Result<U, E> other
)

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) => switch (this) {
	Ok() => other,
	Err(value: E value) => Err(value)
};