pub struct User { /* private fields */ }Expand description
Default implementation of AuthUser
Trait Implementations§
source§impl AuthUser for User
impl AuthUser for User
source§fn new(username: String, pwd_hash: String, admin: bool) -> Self
fn new(username: String, pwd_hash: String, admin: bool) -> Self
Creates new user
(implement validation in validation requires in implementation)
source§fn existing(
id: i32,
username: String,
pwd_hash: String,
admin: bool,
blocked: bool,
created_at: DateTime<Utc>,
updated_at: DateTime<Utc>,
) -> Self
fn existing( id: i32, username: String, pwd_hash: String, admin: bool, blocked: bool, created_at: DateTime<Utc>, updated_at: DateTime<Utc>, ) -> Self
for mapping purposes
fn id(&self) -> i32
fn username(&self) -> &str
fn admin(&self) -> bool
fn blocked(&self) -> bool
fn created_at(&self) -> DateTime<Utc>
fn updated_at(&self) -> DateTime<Utc>
fn set_pwd_hash(&mut self, value: String)
fn set_updated_at(&mut self, value: DateTime<Utc>)
fn set_blocked(&mut self, value: bool)
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
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)