use async_trait::async_trait; use url::Url; #[derive(Debug, Clone)] pub struct ApProfileField { pub name: String, pub value: String, } #[derive(Debug, Clone)] pub struct ApUser { pub id: uuid::Uuid, pub username: String, pub bio: Option, pub avatar_url: Option, pub banner_url: Option, pub also_known_as: Option, pub profile_url: Option, pub attachment: Vec, } #[async_trait] pub trait ApUserRepository: Send + Sync { async fn find_by_id(&self, id: uuid::Uuid) -> anyhow::Result>; async fn find_by_username(&self, username: &str) -> anyhow::Result>; async fn count_users(&self) -> anyhow::Result; }