pub struct SettingsAccount {
pub name: String,
pub email: Option<String>,
pub hash: Option<Vec<u8>>,
pub biography: Option<Vec<Existing<Part>>>,
}Expand description
User settings for the user themself, ie name, biography, and security details.
Fields§
§name: StringThe user’s visible username.
§Note
Usernames are not unique, users are tracked with their Id only.
Due to this, multiple users can have the same username. If possible let the user choose which account they interact with instead of using the first retrieved user.
email: Option<String>The user’s email address.
§Variant
Is only Some when returned for login, a email change and for a user
profile ‘view’.
hash: Option<Vec<u8>>The hash of the user’s password stored as bytes.
§Variant
This is only Some during a login attempt or password change.
biography: Option<Vec<Existing<Part>>>Trait Implementations§
Source§impl Clone for SettingsAccount
impl Clone for SettingsAccount
Source§fn clone(&self) -> SettingsAccount
fn clone(&self) -> SettingsAccount
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 SettingsAccount
impl Debug for SettingsAccount
Source§impl<'de> Deserialize<'de> for SettingsAccount
impl<'de> Deserialize<'de> for SettingsAccount
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
Source§impl Hash for SettingsAccount
impl Hash for SettingsAccount
Source§impl Ord for SettingsAccount
impl Ord for SettingsAccount
Source§fn cmp(&self, other: &SettingsAccount) -> Ordering
fn cmp(&self, other: &SettingsAccount) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SettingsAccount
impl PartialEq for SettingsAccount
Source§impl PartialOrd for SettingsAccount
impl PartialOrd for SettingsAccount
Source§impl Serialize for SettingsAccount
impl Serialize for SettingsAccount
impl Eq for SettingsAccount
impl StructuralPartialEq for SettingsAccount
Auto Trait Implementations§
impl Freeze for SettingsAccount
impl RefUnwindSafe for SettingsAccount
impl Send for SettingsAccount
impl Sync for SettingsAccount
impl Unpin for SettingsAccount
impl UnwindSafe for SettingsAccount
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoOption for T
impl<T> IntoOption for T
Source§fn some_if(self, predicate: bool) -> Option<Self>
fn some_if(self, predicate: bool) -> Option<Self>
Results
Some(self) if the predicate returns true, or None otherwise.Source§fn with_some_if<F>(self, predicate: F) -> Option<Self>
fn with_some_if<F>(self, predicate: F) -> Option<Self>
Results
Some(self) if the predicate returns true, or None otherwise.Source§impl<T> IntoResult for T
impl<T> IntoResult for T
Source§fn ok_if<E>(self, predicate: bool, err: E) -> Result<Self, E>
fn ok_if<E>(self, predicate: bool, err: E) -> Result<Self, E>
Results
Ok(self) if the predicate returns true, or Err(err) otherwise.Source§fn with_ok_if<F, E>(self, predicate: F, err: E) -> Result<Self, E>
fn with_ok_if<F, E>(self, predicate: F, err: E) -> Result<Self, E>
Results
Ok(self) if the predicate returns true, or Err(err) otherwise.Source§impl<T> Peep for T
impl<T> Peep for T
Source§impl<T> Wrap for T
impl<T> Wrap for T
Source§fn wrap_ref<F>(self, wrap: F) -> Selfwhere
F: FnOnce(&Self),
fn wrap_ref<F>(self, wrap: F) -> Selfwhere
F: FnOnce(&Self),
Turns a self reference function call into an ‘inline’/‘builder’ call. Read more