crypto_api_osrandom 0.2.0

An interface to the OS' secure random number generator for `crypto_api`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Implements the crate's error type

use std::{
    error,
    fmt::{Display, Formatter, Result as FmtResult},
};

/// An error that indicates that something went wrong while calling the OS' RNG
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Error;
impl Display for Error {
    fn fmt(&self, f: &mut Formatter) -> FmtResult {
        write!(f, "Severe RNG error")
    }
}
impl error::Error for Error {
    /* No members to implement */
}