pub struct DefaultUserManager<S>where
S: UserStorage,{ /* private fields */ }Expand description
Default implementation of the UserManager trait
This implementation wraps a UserStorage implementation and provides the core user management functionality needed by authentication systems.
Implementations§
Source§impl<S> DefaultUserManager<S>where
S: UserStorage,
impl<S> DefaultUserManager<S>where
S: UserStorage,
Trait Implementations§
Source§impl<S> UserManager for DefaultUserManager<S>where
S: UserStorage,
impl<S> UserManager for DefaultUserManager<S>where
S: UserStorage,
Source§fn create_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 NewUser,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 NewUser,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new user
Source§fn get_user<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a user by ID
Source§fn get_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a user by email
Source§fn get_or_create_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_or_create_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an existing user or create a new one if not found
Source§fn update_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a user’s information
Auto Trait Implementations§
impl<S> Freeze for DefaultUserManager<S>
impl<S> RefUnwindSafe for DefaultUserManager<S>where
S: RefUnwindSafe,
impl<S> Send for DefaultUserManager<S>
impl<S> Sync for DefaultUserManager<S>
impl<S> Unpin for DefaultUserManager<S>
impl<S> UnwindSafe for DefaultUserManager<S>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more