easy-auth 0.3.0

lib qui facilite la génération de mot de passe et l'encodage decodage de jwt
Documentation
use std::error::Error;
use std::fmt::{Debug, Display, Formatter};

#[derive(Debug, Eq, PartialEq)]
pub struct DecodeError {
    cause: String
}

impl DecodeError {
    pub fn new(cause: String) -> Self {
        Self {
            cause
        }
    }
}

impl Display for DecodeError {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "decode error : {}", self.to_string())
    }
}

impl Error for DecodeError {}