Trait swiftide::traits::Storage

source ·
pub trait Storage: Send + Sync {
    // Required methods
    fn setup<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store<'life0, 'async_trait>(
        &'life0 self,
        node: IngestionNode,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn batch_store<'life0, 'async_trait>(
        &'life0 self,
        nodes: Vec<IngestionNode>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn batch_size(&self) -> Option<usize> { ... }
}
Expand description

Persists nodes

Required Methods§

source

fn setup<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn store<'life0, 'async_trait>( &'life0 self, node: IngestionNode, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn batch_store<'life0, 'async_trait>( &'life0 self, nodes: Vec<IngestionNode>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Implementors§