INNER CODE UNIT · Rust

fmt

arkworks-rs/crypto-primitives · crypto-primitives/src/lib.rs:55

    fn fmt(&self, f: &mut ark_std::fmt::Formatter<'_>) -> ark_std::fmt::Result {
        match self {
            Self::IncorrectInputLength(len) => write!(f, "incorrect input length: {len}"),
            Self::NotPrimeOrder => write!(f, "element is not prime order"),
            Self::GenericError(e) => write!(f, "{e}"),
            Self::SerializationError(e) => write!(f, "{e}"),
        }
    }
}

impl ark_std::error::Error for Error {}

impl From<ark_serialize::SerializationError> for Error {
    fn from(e: ark_serialize::SerializationError) -> Self {
        Self::SerializationError(e)
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…