def write_manifest.encoded
mylsm-lsm-store@0.6.0.1 · src/legacy/ManifestIo.bend:83
import mylsm-lsm-store@0.6.0.1/src/legacy/ManifestIo.bend as ManifestIo
import Base
import mylsm-lsm-store@0.6.0.1/src/Manifest.bend as Manifest
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
83def write_manifest.encoded(
84 path: String,
85 encoded: Result<&1, &1, Manifest.Error, Bytes.Bytes>
86) -> IO(Result<&1, &1, U32 & String, Unit>):
87 match encoded:
88 case Fail{_}:
89 IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{(U32.from_nat(1n), "cannot encode manifest")})
90 case Done{bytes}:
91 write_manifest.bytes(path, bytes)