pub fn maybe_shared<Shared, MaybeShared, F>(
value: MaybeShared,
ctor: F,
) -> Sharedwhere
Shared: 'static,
MaybeShared: IntoShared<Shared> + 'static,
F: FnOnce(MaybeShared) -> Shared,
Expand description
Given a value
, determine if that value is already shared. If it is, return it. Otherwise, wrap it in a shared type.
See the module docs for information about shared types.