How should I try to store this data?

I want to "store" configured SslConnectorBuilders from the boring crate in an enum inside reqwest (specifically this one) which requires the type to be clonable.

Since the builder is not clonable and I have to create a new one for each use, while preserving the configuration in some form I'm thinking of using something like a Arc<dyn Fn() -> SslConnectorBuilder + Send + Sync> to do the job.

Does anyone have suggestions on how to go about this?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.