pub trait DatasetExt: Dataset {
// Provided methods
fn push<'life0, 'life1, 'async_trait, T>(
&'life0 self,
item: &'life1 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where T: 'async_trait + Serialize + Send + Sync,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn push_batch<'life0, 'life1, 'async_trait, T>(
&'life0 self,
items: &'life1 [T],
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where T: 'async_trait + Serialize + Send + Sync,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn list<'life0, 'async_trait, T>(
&'life0 self,
opts: ListOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<T>>> + Send + 'async_trait>>
where T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn stream<T: DeserializeOwned + Send + 'static>(
&self,
opts: ListOptions,
) -> BoxStream<'_, StorageResult<T>> { ... }
}Expand description
Typed convenience operations available on every Dataset.
Provided Methods§
Sourcefn push<'life0, 'life1, 'async_trait, T>(
&'life0 self,
item: &'life1 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
fn push<'life0, 'life1, 'async_trait, T>( &'life0 self, item: &'life1 T, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
Serializes and appends one item.
Sourcefn push_batch<'life0, 'life1, 'async_trait, T>(
&'life0 self,
items: &'life1 [T],
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
fn push_batch<'life0, 'life1, 'async_trait, T>( &'life0 self, items: &'life1 [T], ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
Serializes and appends a batch of items.
Sourcefn list<'life0, 'async_trait, T>(
&'life0 self,
opts: ListOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<T>>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait, T>(
&'life0 self,
opts: ListOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<T>>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Lists and deserializes typed items.
Sourcefn stream<T: DeserializeOwned + Send + 'static>(
&self,
opts: ListOptions,
) -> BoxStream<'_, StorageResult<T>>
fn stream<T: DeserializeOwned + Send + 'static>( &self, opts: ListOptions, ) -> BoxStream<'_, StorageResult<T>>
Streams and deserializes typed items.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".