pub struct StoredUser {
pub id: String,
pub email: String,
pub display_name: String,
pub role: UserRole,
pub is_active: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub last_login_at: Option<DateTime<Utc>>,
}Expand description
A stored user account.
The password hash lives in zlayer-secrets::CredentialStore keyed by the
email address — NOT in this record. This type only carries user metadata.
Fields§
§id: StringOpaque user ID (UUIDv4 string).
email: StringPrimary login identifier. Stored lower-cased.
display_name: StringHuman-readable display name.
role: UserRoleRole — “admin” or “user”.
is_active: boolWhether the user can log in.
created_at: DateTime<Utc>When the user was created.
updated_at: DateTime<Utc>When the user was last updated.
last_login_at: Option<DateTime<Utc>>When the user last logged in (if ever).
Implementations§
Trait Implementations§
Source§impl Clone for StoredUser
impl Clone for StoredUser
Source§fn clone(&self) -> StoredUser
fn clone(&self) -> StoredUser
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 ComposeSchema for StoredUser
impl ComposeSchema for StoredUser
Source§impl Debug for StoredUser
impl Debug for StoredUser
Source§impl<'de> Deserialize<'de> for StoredUser
impl<'de> Deserialize<'de> for StoredUser
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 From<&StoredUser> for UserView
impl From<&StoredUser> for UserView
Source§fn from(u: &StoredUser) -> Self
fn from(u: &StoredUser) -> Self
Converts to this type from the input type.
Source§impl Serialize for StoredUser
impl Serialize for StoredUser
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
Mutably borrows from an owned value. Read more