Expand description
Thread-safe by-ref value injection with send_ref_pure.
Like RefPointed::ref_pure, but
requires A: Send + Sync + Clone so the result can cross thread boundaries.
§Examples
use fp_library::{
brands::*,
classes::*,
functions::*,
types::*,
};
let value = 42;
let lazy = send_ref_pure::<LazyBrand<ArcLazyConfig>, _>(&value);
assert_eq!(*lazy.evaluate(), 42);Traits§
- Send
RefPointed - A type class for injecting a value into a context from a reference,
with
Send + Syncbounds.
Functions§
- send_
ref_ pure - Wraps a cloned value in a new thread-safe memoized context.