arkiv_storage_tx/
error.rs1#[derive(Debug)]
2pub enum Error {
3 IOError(std::io::Error),
4 AlloyRLP(alloy_rlp::Error),
5}
6
7impl std::error::Error for Error {}
8
9impl std::fmt::Display for Error {
10 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11 match self {
12 Self::IOError(e) => write!(f, "IOError({e})"),
13 Self::AlloyRLP(e) => write!(f, "AlloyRLP({e})"),
14 }
15 }
16}
17
18impl From<std::io::Error> for Error {
19 fn from(v: std::io::Error) -> Self {
20 Self::IOError(v)
21 }
22}
23
24impl From<alloy_rlp::Error> for Error {
25 fn from(v: alloy_rlp::Error) -> Self {
26 Self::AlloyRLP(v)
27 }
28}