typed_store/rocks/
errors.rs1use rocksdb::Error as RocksError;
6use typed_store_error::TypedStoreError;
7
8pub fn typed_store_err_from_bincode_err(err: bincode::Error) -> TypedStoreError {
9 TypedStoreError::Serialization(format!("{err}"))
10}
11
12pub fn typed_store_err_from_bcs_err(err: bcs::Error) -> TypedStoreError {
13 TypedStoreError::Serialization(format!("{err}"))
14}
15
16pub fn typed_store_err_from_rocks_err(err: RocksError) -> TypedStoreError {
17 TypedStoreError::RocksDB(format!("{err}"))
18}