extern crate alloc;
use alloc::string::String;
use core::fmt;
#[derive(Debug, Clone)]
pub enum KzgError {
BadArgs(String),
InternalError,
InvalidBytesLength(String),
InvalidHexFormat(String),
InvalidTrustedSetup(String),
}
impl fmt::Display for KzgError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::BadArgs(s)
| Self::InvalidBytesLength(s)
| Self::InvalidHexFormat(s)
| Self::InvalidTrustedSetup(s) => f.write_str(s),
Self::InternalError => f.write_str("Internal error"),
}
}
}