def header.block_count.checked

mylsm-lsm-store@0.6.0.1 · src/transfer/Restore.bend:126

import mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend as Restore
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

126def header.block_count.checked(input: Bytes.Bytes, valid: Bool) -> Result<&1, &1, Error, Header>:
127  match valid:
128    case False{}: Fail{ResourceLimit{}}
129    case True{}: header.entry_count.read(Bytes.get.u32be(input, 12))

Uses (7)

Used by (1)