def encode.prefix

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

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

52# Encodes one byte-prefix request with an owner snapshot token.
53def encode.prefix(snapshot_id: U32, prefix: Bytes.Bytes) -> Bytes.Bytes:
54  Bytes.concat([Protocol.snapshot.id.bytes(snapshot_id),
55    Protocol.u32.bytes(1), bound.present(Bytes.length(prefix))])

Uses (8)

Used by (1)