def index.page.footer.exact

mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1515

import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo
import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as SHA

1515def index.page.footer.exact(
1516  pair: File & Result<&1, &1, U32 & String, SstStreamIo.ExactResult>,
1517  reader: IndexMeta,
1518  root_hash: SHA.Stream
1519) -> IO(Result<&1, &1, U32 & String, Step>):
1520  match pair:
1521    case (file, Fail{error}): close.failed(file, error)
1522    case (file, Done{SstStreamIo.ExactResult{footer, complete}}):
1523      match complete:
1524        case False{}: close.failed(file, corruption("truncated byte SST footer"))
1525        case True{}:
1526          index.page.footer.pair(file, reader, footer, root_hash)

Uses (15)

Used by (1)