def file.bounded
import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFileimport 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)