feat: def get_email trait

This commit is contained in:
realaravinth
2022-05-26 20:35:25 +05:30
parent aad49dbb94
commit 6e45c643b1
3 changed files with 18 additions and 0 deletions

View File

@@ -113,6 +113,9 @@ pub trait MCDatabase: std::marker::Send + std::marker::Sync + CloneSPDatabase {
/// check if username exists
async fn username_exists(&self, username: &str) -> DBResult<bool>;
/// get user email
async fn get_email(&self, username: &str) -> DBResult<Option<String>>;
/// check if email exists
async fn email_exists(&self, email: &str) -> DBResult<bool>;