pub trait DsnSyncPieceGetter: Debug {
    // Required method
    fn get_piece<'life0, 'async_trait>(
        &'life0 self,
        piece_index: PieceIndex,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Piece>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait representing a way to get pieces for DSN sync purposes

Required Methods§

source

fn get_piece<'life0, 'async_trait>( &'life0 self, piece_index: PieceIndex, ) -> Pin<Box<dyn Future<Output = Result<Option<Piece>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

source§

impl<PV> DsnSyncPieceGetter for PieceProvider<PV>
where PV: PieceValidator,

source§

fn get_piece<'life0, 'async_trait>( &'life0 self, piece_index: PieceIndex, ) -> Pin<Box<dyn Future<Output = Result<Option<Piece>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl<T> DsnSyncPieceGetter for Arc<T>

source§

fn get_piece<'life0, 'async_trait>( &'life0 self, piece_index: PieceIndex, ) -> Pin<Box<dyn Future<Output = Result<Option<Piece>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§