Skip to main content

AttachableResolver

Trait AttachableResolver 

Source
pub trait AttachableResolver<DB>:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn attach_database(
        &self,
        db: Arc<AsyncRwLock<DB>>,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

A resolver that can attach a database at runtime.

Implementations receive a database handle after startup so they can serve incoming sync requests once the database is initialized.

Required Methods§

Source

fn attach_database( &self, db: Arc<AsyncRwLock<DB>>, ) -> impl Future<Output = ()> + Send

Attach a database for serving incoming requests.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<DB, F, Op, D> AttachableResolver<DB> for commonware_glue::stateful::db::p2p::standard::Mailbox<DB, F, Op, D>
where F: Family, Op: Read<Cfg = ()> + Send + Sync + Clone + 'static, D: Digest, DB: Send + Sync + 'static,

Source§

impl<DB, F, Op, H> AttachableResolver<DB> for commonware_glue::stateful::db::p2p::compact::Mailbox<DB, F, Op, H>
where DB: Send + Sync + 'static, F: Family, Op: Send + Sync + Clone + 'static, H: Hasher,