def lookup.hit.value

mylsm-lsm-store@0.6.0.1 · src/ByteMemTable.bend:205

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

205# Clones a found value so the table remains readable after the lookup.
206def lookup.hit.value(
207  value: Maybe<&1, Bytes.Bytes>,
208  prefix: List<&1, Entry>,
209  key: Bytes.Bytes,
210  tail: List<&1, Entry>
211) -> Lookup:
212  match value:
213    case None{}:
214      lookup.result(prefix, Con{Entry{key, None{}}, tail}, None{}, True{})
215    case Some{bytes}:
216      lookup.hit(prefix, key, tail, value.clone(Some{bytes}))

Uses (9)

Used by (1)