Function gluon_base::merge::merge

source ·
pub fn merge<F, A, B, R>(
    a_original: &A,
    a: Option<A::Owned>,
    b_original: &B,
    b: Option<B::Owned>,
    f: F
) -> Option<R>
where A: ToOwned + ?Sized, B: ToOwned + ?Sized, F: FnOnce(A::Owned, B::Owned) -> R,
Expand description

Merges two values using f if either or both them is Some(..). If both are None, None is returned.