13 lines
361 B
Rust
13 lines
361 B
Rust
pub struct DatabaseError(pub String);
|
|
|
|
impl From<diesel::result::Error> for DatabaseError {
|
|
fn from(value: diesel::result::Error) -> Self {
|
|
DatabaseError(value.to_string())
|
|
}
|
|
}
|
|
|
|
impl From<argon2::password_hash::Error> for DatabaseError {
|
|
fn from(value: argon2::password_hash::Error) -> Self {
|
|
DatabaseError(value.to_string())
|
|
}
|
|
} |