def parse.header.total

mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:1586

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

1586def parse.header.total(
1587  pair: Bytes.Cursor & Maybe<&2, U32>,
1588  +level: U32
1589) -> Bytes.Cursor & Result<&1, &1, Error, SstHeader>:
1590  match pair:
1591    case (cursor, Some{+total}):
1592      parse.header.blocks(Bytes.Cursor.u32be(cursor), level, total)
1593    case (cursor, None{}):
1594      (cursor, Fail{Malformed{}})

Uses (10)

Used by (1)