pub trait ObjectStore: Sync + Send + Debug {
fn list_file<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
delimiter: Option<String>
) -> Pin<Box<dyn Future<Output = Result<ListEntryStream>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn file_reader(&self, file: SizedFile) -> Result<Arc<dyn ObjectReader>>;
fn list_file_with_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
suffix: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
{ ... }
fn glob_file<'life0, 'life1, 'async_trait>(
&'life0 self,
glob_pattern: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
{ ... }
fn glob_file_with_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
glob_pattern: &'life1 str,
suffix: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
{ ... }
}Expand description
A ObjectStore abstracts access to an underlying file/object storage. It maps strings (e.g. URLs, filesystem paths, etc) to sources of bytes
Required Methods
Returns all the files in path prefix
Returns all the files in prefix if the prefix is already a leaf dir,
or all paths between the prefix and the first occurrence of the delimiter if it is provided.
fn file_reader(&self, file: SizedFile) -> Result<Arc<dyn ObjectReader>>
fn file_reader(&self, file: SizedFile) -> Result<Arc<dyn ObjectReader>>
Get object reader for one file
Provided Methods
fn list_file_with_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
suffix: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn list_file_with_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
suffix: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Calls list_file with a suffix filter
Returns all the files matching glob_pattern
fn glob_file_with_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
glob_pattern: &'life1 str,
suffix: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn glob_file_with_suffix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
glob_pattern: &'life1 str,
suffix: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<FileMetaStream>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Calls glob_file with a suffix filter