def payload_value_bytes

mylsm-lsm-store@0.6.0.1 · src/MemTable.bend:41

import mylsm-lsm-store@0.6.0.1/src/MemTable.bend as MemTable
import Base
import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes

41# Counts UTF-8 payload bytes for a value or tombstone.
42def payload_value_bytes(value: Maybe<&2, String>) -> Nat:
43  match value:
44    case None{}:
45      0n
46    case Some{text}:
47      StorageBytes.string_size(text)

Uses (4)

Used by (1)