ByteWal.record.key.length.checked: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal Lines 338-349 of mylsm-lsm-store@0.6.0.1/src/ByteWal.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&start_line=338&end_line=349 import Base import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Parses a record key length and verifies its bounded range. def record.key.length.checked( pair: Bytes.Bytes & U32, tag: U32, +length: U32, +key_offset: U32 ) -> DecodedRecord: match pair: case (frame, total): record.key.checked(frame, tag, length, key_offset, U32.is_le(length, StorageBytes.MAX_RECORD_BYTES()) && bytes.interval.length(total, key_offset, length)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=DecodedRecord https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=bytes.interval.length https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=record.key.checked https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&name=MAX_RECORD_BYTES