pub trait Storage: Send + Sync {
// Required methods
fn read_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
predicate: Option<&'life2 Expr>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, FnError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn write_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
batch: &'life2 RecordBatch,
) -> Pin<Box<dyn Future<Output = Result<WriteHandle, FnError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_tables<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, FnError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
predicate: &'life2 Expr,
) -> Pin<Box<dyn Future<Output = Result<u64, FnError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn supports_branching(&self) -> bool { ... }
fn fork<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_table: &'life1 str,
_src_branch: &'life2 str,
_dst_branch: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<BranchMetadata, FnError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn schema<'life0, 'life1, 'async_trait>(
&'life0 self,
_table: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<SchemaRef>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Per-instance storage interface.
Required Methods§
Sourcefn read_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
predicate: Option<&'life2 Expr>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
predicate: Option<&'life2 Expr>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn write_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
batch: &'life2 RecordBatch,
) -> Pin<Box<dyn Future<Output = Result<WriteHandle, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
batch: &'life2 RecordBatch,
) -> Pin<Box<dyn Future<Output = Result<WriteHandle, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn list_tables<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_tables<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn supports_branching(&self) -> bool
fn supports_branching(&self) -> bool
Whether this backend supports branched / forked state.
Sourcefn fork<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_table: &'life1 str,
_src_branch: &'life2 str,
_dst_branch: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<BranchMetadata, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fork<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_table: &'life1 str,
_src_branch: &'life2 str,
_dst_branch: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<BranchMetadata, FnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Fork src_branch of table into dst_branch. Default: unsupported.
Granularity is per-dataset (table) because real branching backends
(Lance) track branches and versions independently per dataset.
Multi-dataset orchestration (atomic across all tables of a logical
fork) is the caller’s responsibility.
§Errors
Returns FnError if branching is not supported or the fork
operation fails (missing source branch, name collision, I/O).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".