pub trait Dataset: Send + Sync {
// Required methods
fn push_json<'life0, 'async_trait>(
&'life0 self,
item: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn push_json_batch<'life0, 'async_trait>(
&'life0 self,
items: Vec<Value>,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_raw<'life0, 'async_trait>(
&'life0 self,
opts: ListOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<Value>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_raw(
&self,
opts: ListOptions,
) -> BoxStream<'_, StorageResult<Value>>;
fn export_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn export_csv<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<DatasetInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Object-safe storage for append-only JSON records.
Required Methods§
Sourcefn push_json<'life0, 'async_trait>(
&'life0 self,
item: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn push_json<'life0, 'async_trait>(
&'life0 self,
item: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Appends one raw JSON value.
Sourcefn push_json_batch<'life0, 'async_trait>(
&'life0 self,
items: Vec<Value>,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn push_json_batch<'life0, 'async_trait>(
&'life0 self,
items: Vec<Value>,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Appends a batch of raw JSON values.
Sourcefn list_raw<'life0, 'async_trait>(
&'life0 self,
opts: ListOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_raw<'life0, 'async_trait>(
&'life0 self,
opts: ListOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists raw JSON values according to the supplied options.
Sourcefn stream_raw(&self, opts: ListOptions) -> BoxStream<'_, StorageResult<Value>>
fn stream_raw(&self, opts: ListOptions) -> BoxStream<'_, StorageResult<Value>>
Streams raw JSON values according to the supplied options.
Sourcefn export_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Exports the complete dataset as JSON.
Sourcefn export_csv<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export_csv<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Exports the complete dataset as CSV.
Sourcefn info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<DatasetInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<DatasetInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns dataset metadata.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".