DurableError.classify_open: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError Lines 48-66 of mylsm-lsm-store@0.6.0.1/src/DurableError.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&start_line=48&end_line=66 import Base # Maps open causes to their public error categories. def classify_open(cause: OpenCause, operation: String, path: String) -> Error: match cause: case MissingPath{}: error(NotFound{}, operation, path, 0, "") case ExistingPath{}: error(AlreadyExists{}, operation, path, 0, "") case Locked{}: error(Busy{}, operation, path, 0, "") case InvalidInput{}: error(InvalidArgument{}, operation, path, 0, "") case UnknownFormat{}: error(UnsupportedFormat{}, operation, path, 0, "") case CorruptData{}: error(Corruption{}, operation, path, 0, "") case LimitReached{}: error(ResourceLimit{}, operation, path, 0, "") case OpenHostFailure{code, message}: error(Io{}, operation, path, code, message) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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/DurableError.bend&name=ErrorKind https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&name=OpenCause https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&name=error