PeerAllocator

Trait PeerAllocator 

Source
pub trait PeerAllocator: Send + Sync {
    // Required method
    fn alloc<'life0, 'async_trait>(
        &'life0 self,
        num: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

PeerAllocator allocates Peers for creating region or flow.

Required Methods§

Source

fn alloc<'life0, 'async_trait>( &'life0 self, num: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl<T: PeerAllocator + ?Sized> PeerAllocator for Arc<T>

Source§

fn alloc<'life0, 'async_trait>( &'life0 self, num: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§