def header.entry_count

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

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

144def header.entry_count(pair: Bytes.Bytes & Maybe<&2, U32>) -> Result<&1, &1, Error, Header>:
145  match pair:
146    case (input, value):
147      match value:
148        case None{}: Fail{InvalidFormat{}}
149        case Some{entry_count}:
150          header.entry_count.checked(input, U32.is_le(entry_count, 1048576))

Uses (10)

Used by (1)