def restore.block.frame.limit

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

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

483def restore.block.frame.limit(
484  input: Bytes.Bytes,
485  +offset: Nat,
486  index: U32,
487  record_count: U32,
488  +frame_length: U32,
489  +input_size: U32,
490  valid: Bool
491) -> Result<&1, &1, Error, BlockHeader>:
492  match valid:
493    case False{}: Fail{ResourceLimit{}}
494    case True{}:
495      +block_length = Nat.add(U32.to_nat(frame_length), 48n)
496      restore.block.frame.bounds(input, offset, index, record_count,
497        frame_length, block_length, input_size)

Uses (10)

Used by (1)