Skip to main content

Module send_ref_apply_second

Module send_ref_apply_second 

Source
Expand description

Thread-safe combining of two by-ref contexts, keeping the second value, with send_ref_apply_second.

This is the thread-safe counterpart of RefApplySecond.

§Examples

use fp_library::{
	brands::*,
	functions::*,
	types::*,
};

let x = ArcLazy::new(|| 3);
let y = ArcLazy::new(|| 4);
let result = send_ref_apply_second::<LazyBrand<ArcLazyConfig>, _, _>(&x, &y);
assert_eq!(*result.evaluate(), 4);

Traits§

SendRefApplySecond
A type class for combining two thread-safe by-ref contexts, keeping the second value.

Functions§

send_ref_apply_second
Combines two thread-safe contexts, keeping the value from the second.