def manifest.read.size

mylsm-lsm-store@0.6.0.1 · src/legacy/ManifestIo.bend:204

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 mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes

204def manifest.read.size(
205  file: File,
206  result: Result<&1, &1, U32 & String, Nat>
207) -> IO(Result<&1, &1, U32 & String, Manifest.Manifest>):
208  match result:
209    case Fail{error}:
210      do IO<Result<&1, &1, U32 & String, Manifest.Manifest>>:
211        _closed : Unit <- File.close(file)
212        return Fail{error}
213    case Done{+size}:
214      manifest.read.size.valid(file, size, Nat.is_le(size, U32.to_nat(StorageBytes.MAX_MANIFEST_BYTES())))

Uses (16)

Used by (1)