def item.value.bound.checked

mylsm-lsm-store@0.6.0.1 · src/coordinator/CursorCodec.bend:118

import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend as CursorCodec
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

118# Accepts only an exact frame length after reading the value length.
119def item.value.bound.checked(
120  exact: Bool,
121  payload: Bytes.Bytes,
122  key_length: U32,
123  value_length: U32
124) -> Decision:
125  match exact:
126    case True{}:
127      item.value.slices(payload, u32.duplicate(key_length), value_length)
128    case False{}: Malformed{}

Uses (6)

Used by (1)