all4art_authservice_domain/
hashed_password.rs

1use std::{sync::Arc};
2
3pub trait HashedPassword { 
4    fn equals(&self, hashed_password: Arc<dyn HashedPassword>) -> Result<bool, std::io::Error>;
5}
6
7pub struct BaseHashedPassword { 
8    
9}
10
11impl HashedPassword for BaseHashedPassword { 
12    fn equals(&self, hashed_password: Arc<dyn HashedPassword>) -> Result<bool, std::io::Error> { 
13        Ok(true) 
14    }
15}
16
17impl BaseHashedPassword { 
18    pub fn new() -> Result<Self, std::io::Error> { 
19        Ok(BaseHashedPassword{})
20    }
21}