def read.exhausted
mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:305
import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo
import Base
import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable
305def read.exhausted(state: StreamReadState) -> IO(Result<&1, &1, U32 & String, Sstable.Table>):
306 match state:
307 case ReadHeader{file, _}:
308 read.exhausted.file(file)
309 case ReadHeaderResult{pair, _}:
310 read.exhausted.pair(pair)
311 case ReadBlocks{file, _, _, _}:
312 read.exhausted.file(file)
313 case ReadBlockHeaderResult{pair, _, _, _}:
314 read.exhausted.pair(pair)
315 case ReadBlockBody{file, _, _, _, _, _}:
316 read.exhausted.file(file)
317 case ReadBlockBodyResult{pair, _, _, _, _, _}:
318 read.exhausted.pair(pair)
319 case ReadFooterResult{pair, _, _, _}:
320 read.exhausted.pair(pair)
321 case ReadClose{file, result}:
322 do IO<Result<&1, &1, U32 & String, Sstable.Table>>:
323 _closed : Unit <- File.close(file)
324 return result