Trait zarrs::storage::AsyncListableStorageTraits
source · pub trait AsyncListableStorageTraits: Send + Sync {
// Required methods
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StoreKeys, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<StoreKeys, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<StoreKeysPrefixes, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn size_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn size<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
async
only.Expand description
Async listable storage traits.
Required Methods§
sourcefn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StoreKeys, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StoreKeys, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve all StoreKeys
in the store.
§Errors
Returns a StorageError
if there is an underlying error with the store.
sourcefn list_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<StoreKeys, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<StoreKeys, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve all StoreKeys
with a given StorePrefix
.
§Errors
Returns a StorageError
if the prefix is not a directory or there is an underlying error with the store.
sourcefn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<StoreKeysPrefixes, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<StoreKeysPrefixes, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve all StoreKeys
and StorePrefix
which are direct children of StorePrefix
.
§Errors
Returns a StorageError
if the prefix is not a directory or there is an underlying error with the store.
sourcefn size_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn size_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 StorePrefix,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the size in bytes of all keys under prefix
.
§Errors
Returns a StorageError
if the store does not support size() or there is an underlying error with the store.
Provided Methods§
sourcefn size<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn size<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the size in bytes of the storage.
§Errors
Returns a StorageError
if the store does not support size() or there is an underlying error with the store.
Implementors§
impl AsyncListableStorageTraits for AsyncOpendalStore
opendal
only.impl<T: ObjectStore> AsyncListableStorageTraits for AsyncObjectStore<T>
object_store
only.