def read.decoded

mylsm-lsm-store@0.6.0.1 · src/ByteManifestIo.bend:33

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

33def read.decoded(
34  pair: File & Result<&1, &1, U32 & String, Bytes.Bytes>
35) -> IO(Result<&1, &1, Error, Manifest.ManifestValue>):
36  match pair:
37    case (file, Fail{error}):
38      do IO<Result<&1, &1, Error, Manifest.ManifestValue>>:
39        _closed : Unit <- File.close(file)
40        read.host(error)
41    case (file, Done{bytes}):
42      do IO<Result<&1, &1, Error, Manifest.ManifestValue>>:
43        _closed : Unit <- File.close(file)
44        read.result(Manifest.decode(bytes))

Uses (16)

Used by (1)