Skip to main content

StorageBackend

Trait StorageBackend 

Source
pub trait StorageBackend: Send + Sync {
    // Required methods
    fn scheme(&self) -> &'static str;
    fn open<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        uri: &'life1 str,
        options: &'life2 StorageOptions,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>, FnError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

A storage backend identified by URI scheme.

Required Methods§

Source

fn scheme(&self) -> &'static str

URI scheme this backend handles ("lance", "s3", "memory").

Source

fn open<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uri: &'life1 str, options: &'life2 StorageOptions, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>, FnError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Open the backend at uri.

§Errors

Returns FnError if the URI is malformed or the backend cannot be opened (auth failure, network error).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§