DurableBatchPolicy.validate_count: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend as DurableBatchPolicy Lines 119-125 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=119&end_line=125 import Base # Rejects empty and oversized batches before writing. def validate_count(count: Nat) -> Validation: match count: case 0n: EmptyBatch{} case count: Bool.pick(Validation, within_batch_count(count), ValidBatch{}, BatchCountExceeded{}) Uses (4): 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=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=within_batch_count