#[derive(Debug, thiserror::Error)]
pub enum CoreError {
#[error("Empty data: {operation} requires non-empty input data")]
EmptyData { operation: String },
#[error("Invalid input: {0}")]
InvalidInput(String),
#[error("Merkle tree error: {0}")]
MerkleTree(String),
#[error("Erasure coding error: {details}")]
ErasureCoding { details: String },
#[error("Index out of bounds: index {index}, length {length}")]
IndexOutOfBounds { index: usize, length: usize },
}
pub type Result<T> = std::result::Result<T, CoreError>;