Skip to main content

ShardAdopter

Trait ShardAdopter 

Source
pub trait ShardAdopter:
    Send
    + Sync
    + 'static {
    // Required method
    fn adopt_shards<'life0, 'life1, 'async_trait>(
        &'life0 self,
        shards: &'life1 [usize],
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The failover action the supervisor invokes when a peer is confirmed down. Implemented by Engine in production and by a fake in tests.

Required Methods§

Source

fn adopt_shards<'life0, 'life1, 'async_trait>( &'life0 self, shards: &'life1 [usize], ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Adopt shards from a dead peer: elect + union-merge + resume.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ShardAdopter for Engine

Source§

fn adopt_shards<'life0, 'life1, 'async_trait>( &'life0 self, shards: &'life1 [usize], ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§