airlab_lib/pwd/
error.rs

1use serde::Serialize;
2
3pub type Result<T> = core::result::Result<T, Error>;
4
5#[derive(Debug, Serialize)]
6pub enum Error {
7    KeyFail,
8
9    NotMatching,
10}
11
12impl core::fmt::Display for Error {
13    fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::result::Result<(), core::fmt::Error> {
14        write!(fmt, "{self:?}")
15    }
16}
17
18impl std::error::Error for Error {}