zip<U> method
Zips this Option with another Option, returning a Record of their
held values.
Returns:
- Some<(T, U)> if this
Optionis Some<T> andotheris Some<U>. - None<(T, U)> otherwise.
See: OptionUnzip.unzip() for reversing this operation.
See also:
Rust: Option::zip()
Implementation
Option<(T, U)> zip<U>(Option<U> other) => switch ((this, other)) {
(Some(v: T a), Some(v: U b)) => Some((a, b)),
_ => None()
};