ByteWal.record.key.length: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal Lines 351-362 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=351&end_line=362 import Base 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( pair: Bytes.Bytes & Maybe<&2, U32>, tag: U32, offset: U32 ) -> DecodedRecord: match pair: case (frame, None{}): record.malformed(frame) case (frame, Some{+length}): record.key.length.checked(Bytes.length(frame), tag, length, (offset + 5 : U32)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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.add 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=bend-kit-bytes@0.3.3.0/bytes.bend&name=length 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=record.key.length.checked https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=record.malformed