reth_storage_errors/
writer.rsuse crate::db::DatabaseError;
use reth_primitives::StaticFileSegment;
#[derive(Clone, Debug, derive_more::Display, PartialEq, Eq, derive_more::Error)]
pub enum UnifiedStorageWriterError {
#[display("Database writer is missing")]
MissingDatabaseWriter,
#[display("Static file writer is missing")]
MissingStaticFileWriter,
#[display("Static file writer is of wrong segment: got {_0}, expected {_1}")]
IncorrectStaticFileWriter(StaticFileSegment, StaticFileSegment),
Database(DatabaseError),
}
impl From<DatabaseError> for UnifiedStorageWriterError {
fn from(error: DatabaseError) -> Self {
Self::Database(error)
}
}