use std::{future::Future, sync::Arc}; use thiserror::Error; #[derive(Error, Debug)] pub enum DaoError { #[error("Database query error: {0}")] DatabaseQueryError(#[from] Box), } pub trait HelloDao { fn get_hello(&self) -> impl Future, DaoError>> + Send; } pub trait PermissionDao { fn has_privilege( &self, user: &str, privilege: &str, ) -> impl Future> + Send; }