def item.value.parsed

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

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

156# Distinguishes a complete value length from a truncated header.
157def item.value.parsed(
158  payload: Bytes.Bytes,
159  size: U32,
160  key_length: U32,
161  parsed: Maybe<&2, U32>
162) -> Decision:
163  match parsed:
164    case Some{value_length}:
165      item.value.bound(payload, size, key_length, value_length)
166    case None{}: Malformed{}

Uses (5)

Used by (1)