def restore.block.checked
mylsm-lsm-store@0.6.0.1 · src/transfer/Restore.bend:712
import mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend as Restore
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
712def restore.block.checked(
713 result: Result<&1, &1, Error, BlockHeader & List<&1, ByteMemTable.Entry>>
714) -> Result<&1, &1, Error, BlockMeta>:
715 match result:
716 case Fail{error}: Fail{error}
717 case Done{(verified, entries)}:
718 match verified:
719 case BlockHeader{input, +offset, _, +record_count,
720 +frame_length, +block_length}:
721 Done{BlockMeta{input, offset, Nat.add(offset, 16n),
722 U32.to_nat(frame_length), U32.to_nat(record_count), block_length,
723 entries}}