def parse.header.blocks.valid
mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:1560
import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
1560def parse.header.blocks.valid(
1561 cursor: Bytes.Cursor,
1562 +level: U32,
1563 +total: U32,
1564 +count: U32,
1565 valid: Bool
1566) -> Bytes.Cursor & Result<&1, &1, Error, SstHeader>:
1567 match valid:
1568 case False{}:
1569 (cursor, Fail{Malformed{}})
1570 case True{}:
1571 (cursor, Done{SstHdr{level, total, count}})