Function subspace_farmer_components::reading::read_piece

source ยท
pub async fn read_piece<PosTable, S, A>(
    piece_offset: PieceOffset,
    sector_id: &SectorId,
    sector_metadata: &SectorMetadataChecksummed,
    sector: &ReadAt<S, A>,
    erasure_coding: &ErasureCoding,
    mode: ReadSectorRecordChunksMode,
    table_generator: &mut PosTable::Generator,
) -> Result<Piece, ReadingError>
where PosTable: Table, S: ReadAtSync, A: ReadAtAsync,
Expand description

Read piece from sector.

NOTE: Even though this function is async, proof of time table generation is expensive and should be done in a dedicated thread where blocking is allowed.