Kinrany opened a new pull request, #678:
URL: https://github.com/apache/arrow-rs-object-store/pull/678
# Which issue does this PR close?
Purely internal, probably not worth being included in the logs?
# Rationale for this change
I'd like to be able to represent object store locations as URLs (with
bidirectional conversions), so I was reading the `parse_url` implementation.
I noticed that the `builder_opts!` macro only exists because of the need to
be generic over the builder types. So I replaced it with a trait that can
create a builder from a URL and options.
# What changes are included in this PR?
New private trait `FromUrlBuilder` with provided method
`build_from_url_and_options`.
It can be implemented for any builder that:
- has a default constructor
- allows setting a URL
- allows setting key-value configuration options
- can be built, producing `crate::Result<Box<dyn ObjectStore>>`
Implemented for AWS, GCP, Azure, HTTP.
# Are there any user-facing changes?
No user-facing changes whatsoever.
It _might_ make sense to include the trait in the public API in the future.
Not sure.
I named it `FromUrlBuilder` to limit scope, but I can see it being used more
generally since a lot of the builder code is so similar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]