Simplify API of create_unbootstrapped, maybe
It looks like create_unbootstrapped just got a third argument:
pub fn create_unbootstrapped(
runtime: R,
config: TorClientConfig,
autobootstrap: BootstrapBehavior,
I'm very glad to have this feature, but I have a question: Are we confident that autobootstrap
is the very last setup option that we'll want to add here? Otherwise, I'm worried that we'll want to keep adding more arguments in the future.
Three ways I can think of to solve this:
-
Declare that yes,
autobootrap
is special and we won't want to add any more. -
Replace
autobootstrap
with aClientSetupOptions
value that containsautobootstrap
, and can later be extended to include more options. -
Remove
autobootstrap
, and add a separate function to toggle it:fn bootstrap_on_demand(&self, autobootstrap: bool)
.
@eta, @Diziet what do you think here?
Since this would be an API issue I'd like to get it solved before 0.1.0