Function emplacable::box_new_with

source ยท
pub fn box_new_with<T>(
    emplacable: Emplacable<T, impl EmplacableFn<T>>,
) -> Box<T>
where T: ?Sized,
Expand description

Like Box::new, but takes an Emplacer<T, _> instead of T directly.

Runs the contained unsized-value-returning closure, and return sits result emplaced into a Box.