Skip to main content

primefield/
error.rs

1//! Error types.
2
3use core::fmt;
4
5/// Error type.
6#[derive(Clone, Copy, Debug)]
7pub struct Error;
8
9impl fmt::Display for Error {
10    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
11        write!(f, "field error")
12    }
13}
14
15impl core::error::Error for Error {}
16
17/// Result type.
18pub type Result<T> = core::result::Result<T, Error>;