def measure.block.payload

mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:1434

import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal
import mylsm-lsm-store@0.6.0.1/src/Wal.bend as Wal
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

1434def measure.block.payload(
1435  pair: Bytes.Bytes & Maybe<&2, U32>,
1436  +total: U32,
1437  query: Bytes.Bytes
1438) -> Result<&1, &1, Wal.Error, ByteWal.ValueMetadata>:
1439  match pair:
1440    case (block, Some{payload_length}):
1441      measure.block.count(Bytes.get.u32be(block, 4), payload_length, total,
1442        query)
1443    case (_, None{}): Fail{Wal.Malformed{}}

Uses (10)

Used by (1)