primefield 0.14.0

Generic implementation of prime fields built on `crypto-bigint`, along with macros for writing field element newtypes including ones with formally verified arithmetic using `fiat-crypto`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Error types.

use core::fmt;

/// Error type.
#[derive(Clone, Copy, Debug)]
pub struct Error;

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "field error")
    }
}

impl core::error::Error for Error {}

/// Result type.
pub type Result<T> = core::result::Result<T, Error>;