pub struct ProfileService {}Expand description
Profile service for database operations
Implementations§
Source§impl ProfileService
impl ProfileService
pub fn new() -> Self
Sourcepub async fn get_profile(&self, _user_id: Uuid) -> Result<Profile, ProfileError>
pub async fn get_profile(&self, _user_id: Uuid) -> Result<Profile, ProfileError>
Get profile by user ID
Sourcepub async fn update_profile(
&self,
_user_id: Uuid,
_update: ProfileUpdate,
) -> Result<Profile, ProfileError>
pub async fn update_profile( &self, _user_id: Uuid, _update: ProfileUpdate, ) -> Result<Profile, ProfileError>
Update profile
Sourcepub async fn upload_avatar(
&self,
_user_id: Uuid,
_data: Vec<u8>,
_content_type: &str,
) -> Result<String, ProfileError>
pub async fn upload_avatar( &self, _user_id: Uuid, _data: Vec<u8>, _content_type: &str, ) -> Result<String, ProfileError>
Upload avatar
Sourcepub async fn delete_account(&self, _user_id: Uuid) -> Result<(), ProfileError>
pub async fn delete_account(&self, _user_id: Uuid) -> Result<(), ProfileError>
Delete account (GDPR compliant)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfileService
impl RefUnwindSafe for ProfileService
impl Send for ProfileService
impl Sync for ProfileService
impl Unpin for ProfileService
impl UnwindSafe for ProfileService
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more