pub struct User {Show 24 fields
pub id: usize,
pub created: usize,
pub username: String,
pub password: String,
pub salt: String,
pub settings: UserSettings,
pub tokens: Vec<Token>,
pub permissions: Vec<UserPermission>,
pub is_verified: bool,
pub notification_count: usize,
pub totp: String,
pub recovery_codes: Vec<String>,
pub stripe_id: String,
pub ban_reason: String,
pub ban_expire: usize,
pub is_deactivated: bool,
pub checkouts: Vec<String>,
pub last_policy_consent: usize,
pub linked_accounts: UserLinkedAccounts,
pub badges: Vec<UserBadge>,
pub principal_org: usize,
pub org_as_tenant: bool,
pub org_creation_credits: i32,
pub org_user_register_credits: i32,
}Fields§
§id: usize§created: usize§username: String§password: String§salt: String§settings: UserSettings§tokens: Vec<Token>§permissions: Vec<UserPermission>§is_verified: bool§notification_count: usize§totp: StringThe TOTP secret for this profile. An empty value means the user has TOTP disabled.
recovery_codes: Vec<String>The TOTP recovery codes for this profile.
stripe_id: StringThe user’s Stripe customer ID.
ban_reason: StringThe reason the user was banned.
ban_expire: usizeThe time at which the user’s ban will automatically expire.
is_deactivated: boolIf the user is deactivated. Deactivated users act almost like deleted users, but their data is not wiped.
checkouts: Vec<String>The IDs of Stripe checkout sessions that this user has successfully completed.
This should be checked BEFORE applying purchases to ensure that the user hasn’t already applied this purchase.
last_policy_consent: usizeThe time in which the user last consented to the site’s policies.
linked_accounts: UserLinkedAccountsThe other accounts in the database that are linked to this account.
badges: Vec<UserBadge>A list of the user’s profile badges.
principal_org: usizeThe ID of the user’s principal organization (i.e. the organization shown on their profile).
org_as_tenant: boolIf the user is locked into their principal organization. Their organization’s owner can manage their account if this is true.
org_creation_credits: i32The number of organizations the user can create.
org_user_register_credits: i32The number of users the user can register to an organization.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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>,
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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