Skip to main content

DatasetExt

Trait DatasetExt 

Source
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§

Source

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,

Serializes and appends one item.

Source

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,

Serializes and appends a batch of items.

Source

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.

Source

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".

Implementors§

Source§

impl<D: Dataset + ?Sized> DatasetExt for D