pub async fn download_segment_pieces<PG>(
segment_index: SegmentIndex,
piece_getter: &PG,
) -> Result<Vec<Option<Piece>>, SegmentDownloadingError>where
PG: PieceGetter,
Expand description
Downloads pieces of the segment such that segment can be reconstructed afterward.
Prefers source pieces if available, on error returns number of downloaded pieces