Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We could take the builder idea to an extreme and allow for BYO functions provided they have the same return type. These would basically be equivalent: ```rust // Fully spelled out let _ = cache_layer_builder() .on_invalid_metadata(&invalid_metadata_action) .on_restored_layer(&|old, _| restored_layer_action(old, metadata)) .layer_name(layer_name!("ruby")) .metadata(metadata) .context(context) .launch(true) .build(true) .call()?; // With defaults let layer_ref = cache_layer_builder() .layer_name(layer_name!("ruby")) .metadata(metadata) .context(context) .call()?; ``` If we went this route, we could rename it to something more generic like simply `cache_layer` or maybe `cache_layer_builder`. The module name could be significant, maybe something like `diff_migrate_cache::layer_builder. Naming is hard.
- Loading branch information