CursorCodec.item.value.bound.compare: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend as CursorCodec Lines 130-144 of mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend&start_line=130&end_line=144 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Accepts only a value length that ends exactly at the frame boundary. def item.value.bound.compare( payload: Bytes.Bytes, size: U32, key_lengths: U32 & U32, value_lengths: U32 & U32 ) -> Decision: match key_lengths: case (checked_key_length, retained_key_length): match value_lengths: case (checked_value_length, retained_value_length): item.value.bound.checked(Nat.is_eq(U32.to_nat(size), Nat.add(9n, Nat.add(U32.to_nat(checked_key_length), U32.to_nat(checked_value_length)))), payload, retained_key_length, retained_value_length) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq 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.to_nat 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/coordinator/CursorCodec.bend&name=Decision https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend&name=item.value.bound.checked