DurableBatchPolicy.validate_frame_bytes: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend as DurableBatchPolicy Lines 54-63 of mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend&start_line=54&end_line=63 import Base # Decides whether one encoded frame is within its selected byte ceiling. def validate_frame_bytes( count: Nat, encoded_bytes: Nat, batch_limit: Nat, single_limit: Nat ) -> Validation: Bool.pick(Validation, Nat.is_le(encoded_bytes, frame_byte_limit(count, batch_limit, single_limit)), ValidBatch{}, BatchBytesExceeded{}) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend&name=Validation https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend&name=frame_byte_limit