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§

source

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.

source

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.

source

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§

source§

impl ListableStorageTraits for FilesystemStore

source§

impl ListableStorageTraits for MemoryStore

source§

impl ListableStorageTraits for OpendalStore

Available on crate feature opendal only.
source§

impl<TStorage: ?Sized + ListableStorageTraits> ListableStorageTraits for StorageHandle<TStorage>

source§

impl<TStorage: ?Sized + ReadableStorageTraits> ListableStorageTraits for ZipStorageAdapter<TStorage>

Available on crate feature zip only.