pub struct UserService<R: UserRepository> { /* private fields */ }Expand description
Service for user management operations
Implementations§
Source§impl<R: UserRepository> UserService<R>
impl<R: UserRepository> UserService<R>
Sourcepub async fn create_user(
&self,
email: &str,
name: Option<String>,
) -> Result<User, Error>
pub async fn create_user( &self, email: &str, name: Option<String>, ) -> Result<User, Error>
Create a new user
Sourcepub async fn get_user_by_email(
&self,
email: &str,
) -> Result<Option<User>, Error>
pub async fn get_user_by_email( &self, email: &str, ) -> Result<Option<User>, Error>
Get a user by email
Auto Trait Implementations§
impl<R> Freeze for UserService<R>
impl<R> RefUnwindSafe for UserService<R>where
R: RefUnwindSafe,
impl<R> Send for UserService<R>
impl<R> Sync for UserService<R>
impl<R> Unpin for UserService<R>
impl<R> UnwindSafe for UserService<R>where
R: 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