Fn pointer isn't a great fit for public API as it doesn't allow capturing closures to coerce into it.
We have a use case in which we want to download remotely stored .ftl files and then inject them into ArcLoaderBuilder. To accomplish that a capturing closure is necessary.
This shouldn't be a breaking change, Box<dyn FnMut> won't allocate if a fn pointer is provided into ArcLoaderBuilder::customize, and the only downside here is dynamic dispatch.
Fn pointer isn't a great fit for public API as it doesn't allow capturing closures to coerce into it.
We have a use case in which we want to download remotely stored
.ftl
files and then inject them intoArcLoaderBuilder
. To accomplish that a capturing closure is necessary.This shouldn't be a breaking change,
Box<dyn FnMut>
won't allocate if a fn pointer is provided intoArcLoaderBuilder::customize
, and the only downside here is dynamic dispatch.