pub struct StoredUser {Show 13 fields
pub id: i64,
pub email: String,
pub password_hash: String,
pub role: Role,
pub is_active: bool,
pub is_demo: bool,
pub demo_label: Option<String>,
pub must_change_password: bool,
pub mfa_enabled: bool,
pub first_name: Option<String>,
pub last_name: Option<String>,
pub display_name: Option<String>,
pub job_title: Option<String>,
}Fields§
§id: i64§email: String§password_hash: String§role: Role§is_active: bool§is_demo: bool§demo_label: Option<String>§must_change_password: boolMirrors rustio_users.must_change_password. The R2 login flow
(commit #9) reads this through find_user_by_email to decide
whether to set must_change_password on the freshly-issued
Identity; when the flag is set the user is redirected
immediately to /admin/must-change-password after sign-in.
mfa_enabled: boolMirrors rustio_users.mfa_enabled. R3’s do_login
(commit #16) reads this to decide whether to redirect
the freshly-authenticated user to /admin/mfa/verify
before allowing access to /admin.
first_name: Option<String>Profile identity columns. All nullable in the DB; consumers
pick the first non-empty entry following the
display_name → first_name → email-local-part → "there"
fallback chain when rendering greetings. Surface examples:
recovery-email greeting, signature block, future
security-alert emails, operator-facing chrome.
last_name: Option<String>§display_name: Option<String>§job_title: Option<String>Implementations§
Source§impl StoredUser
impl StoredUser
Sourcepub fn greeting_name(&self) -> String
pub fn greeting_name(&self) -> String
Resolve the greeting label per the documented fallback:
display_name → first_name → email-local-part → "there".
Always returns a non-empty string suitable for direct
interpolation into “Hello {x},”.
Sourcepub fn signature_lines(&self) -> (String, Option<String>)
pub fn signature_lines(&self) -> (String, Option<String>)
“Best display name + role” pair used by the recovery email’s signature block. Falls back gracefully when the profile fields are unset.
Auto Trait Implementations§
impl Freeze for StoredUser
impl RefUnwindSafe for StoredUser
impl Send for StoredUser
impl Sync for StoredUser
impl Unpin for StoredUser
impl UnsafeUnpin for StoredUser
impl UnwindSafe for StoredUser
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> 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