Kinrany opened a new issue, #180: URL: https://github.com/apache/arrow-rs-object-store/issues/180
# Motivation I'm writing an application that will use Amazon S3 for long-term storage. I want to also use local file system during development. I'd like to make this configurable: it should be possible to choose the kind of storage at runtime, based on user input. AWS CLI is one well-known application that would clearly benefit from doing this. # Problem Generics are common in Rust. `object_store` itself provides `PrefixObjectStore` that expects a `T: ObjectStore` value. Unfortunately there's no (safe?) way to go back from a trait object to an owned value that implements the trait. That is, unless trait objects explicitly implement the trait. # Solution `impl ObjectStore for Box<dyn ObjectStore>` See https://github.com/apache/arrow-rs/pull/3866 # Alternatives Not sure. For wrappers provided by `object_store` itself it might be possible to have `ObjectStore` provide combinators that return them. Another approach that only really works for sealed traits is creating an enum that includes all possible trait implementations as variants. -- 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]
