pub trait ObjectStoreProvider:
Debug
+ Sync
+ Send {
// Required method
fn new_store<'life0, 'life1, 'async_trait>(
&'life0 self,
base_path: Url,
params: &'life1 ObjectStoreParams,
) -> Pin<Box<dyn Future<Output = Result<ObjectStore>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn extract_path(&self, url: &Url) -> Result<Path> { ... }
fn cache_url(&self, url: &Url) -> String { ... }
}Required Methods§
fn new_store<'life0, 'life1, 'async_trait>(
&'life0 self,
base_path: Url,
params: &'life1 ObjectStoreParams,
) -> Pin<Box<dyn Future<Output = Result<ObjectStore>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
Sourcefn extract_path(&self, url: &Url) -> Result<Path>
fn extract_path(&self, url: &Url) -> Result<Path>
Extract the path relative to the base of the store.
For example, in S3 the path is relative to the bucket. So a URL of
s3://bucket/path/to/file would return path/to/file.
Meanwhile, for a file store, the path is relative to the filesystem root.
So a URL of file:///path/to/file would return /path/to/file.