def body

mylsm-lsm-store@0.6.0.1 · src/ByteManifest.bend:95

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

95# Builds the checksummed body for one manifest value.
96def body(value: ManifestValue) -> Bytes.Bytes:
97  match value:
98    case Empty{}:
99      Bytes.concat([magic(), u32.bytes(4), u32.bytes(1), u32.bytes(1), u32.bytes(0)])
100    case HasSst{}:
101      Bytes.concat([magic(), u32.bytes(4), u32.bytes(1), u32.bytes(1),
102        u32.bytes(1), u32.bytes(3), sst.name()])
103    case GenerationEmpty{}:
104      Bytes.concat([magic(), u32.bytes(5), u32.bytes(1), u32.bytes(1),
105        u32.bytes(0)])
106    case GenerationSst{file_id}:
107      Bytes.concat([magic(), u32.bytes(5), u32.bytes(1), u32.bytes(1),
108        u32.bytes(1), u32.bytes(file_id)])

Uses (7)

Used by (1)