crepererum commented on issue #675:
URL: 
https://github.com/apache/arrow-rs-object-store/issues/675#issuecomment-4160539658

   I wonder if we should design this similar to the attributes system in 
`object_store`, i.e. having a string-like dict or set. This would make it 
easier to extend in the future and may also allow custom capabilities, like 
this:
   
   ```rust
   enum Capability {
      OrderedListing,
      NegativeRange
      Custom(Cow<'static, str>),
   }
   
   impl Capability {
       fn as_str(&self) -> &'str {...}
       fn from_str(s: &str) -> Self {...}
   }
   
   struct Capabilities {
       // impl. detail!
       caps: HashSet<Capability>,
   }
   
   impl Capabilities {
       fn has(&self, cap: &Capability) -> bool {...}
   }
   
   trait ObjectStore {
       fn capabilties(&self) -> &Capabilities;
   }
   ```
   
   We probably need some work on the internals, ideally `Capabilities` can be 
constructed in a const context so that the stores can return a reference w/o 
creating a singelton on the heap.
   
   @tustvold WDYT?


-- 
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]

Reply via email to