feat: Start dummy in-memory database

This commit is contained in:
selfhoster selfhoster 2026-09-01 19:06:33 +02:00
commit bdb5008914
9 changed files with 181 additions and 3 deletions

14
src/db/error.rs Normal file
View file

@ -0,0 +1,14 @@
use std::fmt;
use crate::db::UserRef;
#[derive(Debug)]
pub struct UserAlreadyExists(pub UserRef);
impl fmt::Display for UserAlreadyExists {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "User already exists: {}", self.0)
}
}
impl std::error::Error for UserAlreadyExists {}