def bound.encode

mylsm-lsm-store@0.6.0.1 · src/coordinator/CursorOpenCodec.bend:37

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

37# Encodes an optional bound without interpreting or transforming its bytes.
38def bound.encode(value: Maybe<&1, Bytes.Bytes>) -> Bytes.Bytes:
39  match value:
40    case None{}: bound.absent()
41    case Some{bytes}: bound.present(Bytes.length(bytes))

Uses (5)

Used by (1)