Struct orchestrator::memory::User
source · pub struct User<S: UserState> {
pub ph: PhantomData<S>,
pub user_id: i64,
pub username: String,
pub password_hash: String,
pub logged_in_time: Option<DateTime<Utc>>,
pub logged_in_token: Option<String>,
pub is_admin: bool,
}Expand description
An user, the variant S represent the type of user (if it is Authenticated, Admin, or Unauthenticated).
Fields§
§ph: PhantomData<S>Phantom data used to save the variant
user_id: i64Univoque identification of a user
username: StringUnivoque Username of a user
password_hash: StringHashed password
logged_in_time: Option<DateTime<Utc>>When did it log-in last time?
logged_in_token: Option<String>Which token should use to authenticate
is_admin: boolis an admin? Aka can connect to Admin-only parts?
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for User<S>
impl<S> RefUnwindSafe for User<S>where
S: RefUnwindSafe,
impl<S> Send for User<S>where
S: Send,
impl<S> Sync for User<S>where
S: Sync,
impl<S> Unpin for User<S>where
S: Unpin,
impl<S> UnwindSafe for User<S>where
S: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)