def read.table.opened

mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:370

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

370def read.table.opened(
371  +size: Nat,
372  opened: Result<&1, &1, U32 & String, File>
373) -> IO(Result<&1, &1, U32 & String, Sstable.Table>):
374  match opened:
375    case Fail{error}:
376      IO.pure(Result<&1, &1, U32 & String, Sstable.Table>, Fail{error})
377    case Done{file}:
378      read.loop(Nat.add(Nat.mul(2n, size), 16n), ReadHeader{file, size})

Uses (13)

Used by (1)