pub struct UserProfile {
pub display_name: String,
pub avatar_hash: Option<String>,
pub status_message: Option<String>,
pub created_at: SystemTime,
pub updated_at: SystemTime,
pub preferences: UserPreferences,
pub custom_fields: HashMap<String, String>,
}Expand description
User profile data (stored encrypted)
Fields§
§display_name: StringFull display name
avatar_hash: Option<String>Avatar image hash (BLAKE3)
status_message: Option<String>User status message
created_at: SystemTimeProfile creation timestamp
updated_at: SystemTimeLast updated timestamp
preferences: UserPreferencesUser preferences
custom_fields: HashMap<String, String>Custom profile fields
Implementations§
Source§impl UserProfile
impl UserProfile
Sourcepub fn set_avatar(&mut self, image_data: &[u8])
pub fn set_avatar(&mut self, image_data: &[u8])
Set avatar from image data
Sourcepub fn apply_permissions(&self, permissions: &ProfilePermissions) -> Self
pub fn apply_permissions(&self, permissions: &ProfilePermissions) -> Self
Apply permissions filter to profile
Trait Implementations§
Source§impl Clone for UserProfile
impl Clone for UserProfile
Source§fn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UserProfile
impl Debug for UserProfile
Source§impl<'de> Deserialize<'de> for UserProfile
impl<'de> Deserialize<'de> for UserProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UserProfile
impl RefUnwindSafe for UserProfile
impl Send for UserProfile
impl Sync for UserProfile
impl Unpin for UserProfile
impl UnwindSafe for UserProfile
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