def Bytes.error

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

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

87# Converts internal byte-engine errors into the public byte API error type.
88def Bytes.error(error: RawByteDb.Error) -> Bytes.Error:
89  match error:
90    case RawByteDb.Busy{}: Busy{}
91    case RawByteDb.Timeout{}: Timeout{}
92    case RawByteDb.NotFound{}: NotFound{}
93    case RawByteDb.AlreadyExists{}: AlreadyExists{}
94    case RawByteDb.InvalidArgument{}: InvalidArgument{}
95    case RawByteDb.UnsupportedPlatform{}: UnsupportedPlatform{}
96    case RawByteDb.ResourceLimit{}: ResourceLimit{}
97    case RawByteDb.Corruption{message}: Corruption{message}
98    case RawByteDb.Io{code, message}: Io{code, message}
99    case RawByteDb.CommitUnknown{code, message}: CommitUnknown{code, message}

Uses (2)

Used by (12)