DbLock.lock_result: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock Lines 72-82 of mylsm-lsm-store@0.6.0.1/src/DbLock.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&start_line=72&end_line=82 import Base import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError # Returns an owned lock on success or closes the failed handle. def lock_result( pair: File & Result<&1, &1, U32 & String, Unit>, operation: String, path: String ) -> IO(Result<&1, &1, DurableError.Error, Lock>): match pair: case (file, Fail{error}): lock_failed(file, error, operation, path) case (file, Done{Unit{}}): IO.pure(Result<&1, &1, DurableError.Error, Lock>, Done{Lock{file}}) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO 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=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=lock_failed https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&name=Error