Mercurial > core / rust/lib/db/src/err.rs
changeset 698: |
96958d3eb5b0 |
parent: |
3d78bed56188
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
5 pub type Result<T> = std::result::Result<T, Error>; 10 #[cfg(feature = "rocksdb")] 11 Rocksdb(rocksdb::Error), 14 impl From<io::Error> for Error { 15 fn from(e: io::Error) -> Self { 20 #[cfg(feature = "rocksdb")] 21 impl From<rocksdb::Error> for Error { 22 fn from(e: rocksdb::Error) -> Self { 27 impl fmt::Display for Error { 28 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 30 Error::Io(ref err) => write!(f, "IO error: {}", err), 31 #[cfg(feature = "rocksdb")] 32 Error::Rocksdb(ref err) => write!(f, "RocksDB error: {}", err), 37 impl fmt::Debug for Error { 38 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 40 Error::Io(ref err) => write!(f, "IO error: {}", err), 41 #[cfg(feature = "rocksdb")] 42 Error::Rocksdb(ref err) => write!(f, "RocksDB error: {}", err), 47 impl std::error::Error for Error {}