def Bytes.close

mylsm-lsm-store@0.6.0.1 · mylsm.bend:1781

import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as RawByteDb

1781def Bytes.close(handle: Bytes.Handle) -> IO(Result<&1, &1, Bytes.Error, Unit>):
1782  match handle:
1783    case ByteHandle{raw}:
1784      do IO<Result<&1, &1, Bytes.Error, Unit>>:
1785        result : Result<&1, &1, RawByteDb.Error, Unit> <- RawByteDb.close(raw)
1786        return Bytes.close.result(result)
1787    case RemoteByteHandle{_}:
1788      IO.pure(Result<&1, &1, Bytes.Error, Unit>, Done{Unit{}})

Uses (10)

Used by (1)