sui_pg_db::store

Trait Store

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 'c: 'async_trait,
             Self: '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§

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

Required Methods§

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

Implementors§