pub async fn download_pieces<PG>(
piece_indexes: &[PieceIndex],
piece_getter: &PG,
) -> Result<Vec<Piece>, BoxError>where
PG: ObjectPieceGetter,
Expand description
Concurrently downloads the exact pieces in piece_indexes
, returning them in that order.
Each piece index must be unique.
If any piece can’t be downloaded, returns an error.