Trait deltalake::storage::StorageBackend[][src]

pub trait StorageBackend: Send + Sync + Debug {
    fn head_obj<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, StorageError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_obj<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn list_objs<'a, 'async_trait>(
        &'a self,
        path: &'a str
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ObjectMeta, StorageError>> + Send + 'a>>, StorageError>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        Self: 'async_trait
;
fn put_obj<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        path: &'life1 str,
        obj_bytes: &'life2 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn rename_obj<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        src: &'life1 str,
        dst: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn delete_obj<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn join_path(&self, path: &str, path_to_join: &str) -> String { ... }
fn join_paths(&self, paths: &[&str]) -> String { ... }
fn trim_path(&self, path: &str) -> String { ... } }
Expand description

Abstractions for underlying blob storages hosting the Delta table. To add support for new cloud or local storage systems, simply implement this trait.

Required methods

Fetch object metadata without reading the actual content

Fetch object content

Return a list of objects by path prefix in an async stream.

Create new object with obj_bytes as content.

Moves object from src to dst.

Implementation note:

For a multi-writer safe backend, rename_obj needs to implement atomic rename semantic. In other words, if the destination path already exists, rename should return a StorageError::AlreadyExists error.

Deletes object by path.

Provided methods

Create a new path by appending path_to_join as a new component to path.

More efficient path join for multiple path components. Use this method if you need to combine more than two path components.

Returns trimed path with trailing path separator removed.

Implementors