FormatInspectIo.read.result: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspectIo.bend as FormatInspectIo Lines 40-57 of mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspectIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspectIo.bend&start_line=40&end_line=57 import Base import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError import mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspect.bend as FormatInspect import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def read.result( +path: String, lock: DbLock.Lock, file_result: File & Result<&1, &1, U32 & String, Bytes.Bytes> ) -> IO(Result<&1, &1, Error, FormatInspect.Inspection>): match file_result: case (file, Fail{error}): do IO>: _closed : Unit <- File.close(file) released : Result<&1, &1, DurableError.Error, Unit> <- DbLock.release(lock, "inspect", path) return read.failed.released(error, released) case (file, Done{bytes}): do IO>: _closed : Unit <- File.close(file) released : Result<&1, &1, DurableError.Error, Unit> <- DbLock.release(lock, "inspect", path) return read.success.released(bytes, released) Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.close https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=Lock https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=release https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspect.bend&name=Inspection https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspectIo.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspectIo.bend&name=read.failed.released https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/FormatInspectIo.bend&name=read.success.released