def file.bounded

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

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

297# Rejects an encoded WAL frame larger than the resident block limit.
298def file.bounded(
299  frame: Bytes.Bytes,
300  +level: U32,
301  +total: U32,
302  +payload_len: U32,
303  allowed: Bool
304) -> Result<&1, &1, Error, Bytes.Bytes>:
305  match allowed:
306    case False{}:
307      Fail{TooLarge{}}
308    case True{}:
309      file.block(frame, level, total, payload_len)

Uses (6)

Used by (1)