sui_indexer_alt_framework::store

Trait Store

Source
pub trait Store:
    Send
    + Sync
    + 'static
    + Clone {
    type Connection<'c>: Connection
       where Self: 'c;

    // Required method
    fn connect<'c, 'async_trait>(
        &'c self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Connection<'c>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'c: 'async_trait;
}
Expand description

A storage-agnostic interface that provides database connections for both watermark management and arbitrary writes. The indexer framework accepts this Store implementation to manage watermarks operations through its associated Connection type. This store is also passed to the pipeline handlers to perform arbitrary writes to the store.

Required Associated Types§

Source

type Connection<'c>: Connection where Self: 'c

Required Methods§

Source

fn connect<'c, 'async_trait>( &'c self, ) -> Pin<Box<dyn Future<Output = Result<Self::Connection<'c>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'c: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Store for Db

Source§

type Connection<'c> = PooledConnection<'c, AsyncDieselConnectionManager<AsyncPgConnection>>

Source§

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

Implementors§