Trait zarrs::storage::ListableStorageTraits
source · pub trait ListableStorageTraits: Send + Sync {
// Required methods
fn list(&self) -> Result<StoreKeys, StorageError>;
fn list_prefix(
&self,
prefix: &StorePrefix
) -> Result<StoreKeys, StorageError>;
fn list_dir(
&self,
prefix: &StorePrefix
) -> Result<StoreKeysPrefixes, StorageError>;
}
Expand description
Listable storage traits.
Required Methods§
sourcefn list(&self) -> Result<StoreKeys, StorageError>
fn list(&self) -> Result<StoreKeys, StorageError>
Retrieve all StoreKeys
in the store.
§Errors
Returns a StorageError
if there is an underlying error with the store.
sourcefn list_prefix(&self, prefix: &StorePrefix) -> Result<StoreKeys, StorageError>
fn list_prefix(&self, prefix: &StorePrefix) -> Result<StoreKeys, StorageError>
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(
&self,
prefix: &StorePrefix
) -> Result<StoreKeysPrefixes, StorageError>
fn list_dir( &self, prefix: &StorePrefix ) -> Result<StoreKeysPrefixes, StorageError>
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.
Implementors§
impl ListableStorageTraits for FilesystemStore
impl ListableStorageTraits for MemoryStore
impl ListableStorageTraits for OpendalStore
Available on crate feature
opendal
only.impl<TStorage: ?Sized + ListableStorageTraits> ListableStorageTraits for StorageHandle<TStorage>
impl<TStorage: ?Sized + ReadableStorageTraits> ListableStorageTraits for ZipStorageAdapter<TStorage>
Available on crate feature
zip
only.