pub async fn download_pieces<PG>(
piece_indexes: Arc<[PieceIndex]>,
piece_getter: &PG,
) -> Result<Vec<Piece>>where
PG: PieceGetter,
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.