novax_data/error/
data.rs

1use crate::error::address::AddressError;
2use serde::{Deserialize, Serialize};
3use crate::error::utils::UtilsError;
4
5/// Enumerates the centralized error handling types across different operations.
6///
7/// `DataError` serves as a unified error type that aggregates different error types from
8/// various operations into a single enum. This centralization facilitates error handling
9/// across different parts of the codebase.
10///
11/// # Variants
12/// - `Address(AddressError)`: Encapsulates errors that occur during address-related operations,
13///     as represented by the `AddressError` enum.
14/// - `Utils(UtilsError)`: Encapsulates errors that occur within utility functions,
15///     as represented by the `UtilsError` enum.
16#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)]
17pub enum DataError {
18    /// Represents an error from address-related operations.
19    Address(AddressError),
20    /// Represents an error from utility functions.
21    Utils(UtilsError),
22}