pub struct ModelUserOtp {
pub id: i32,
pub user_id: i32,
pub token: String,
pub email: String,
pub state: i32,
pub exp_date_utc: DateTime<Utc>,
pub consumed_date_utc: Option<DateTime<Utc>>,
}Expand description
ModelUserOtp
Representation in the db for a user’s one-time-use password reset token
Each user has 1 and only 1 users_otp record
§DB table
users_otp
§Arguments
id-i32-users_otp.idin the dbuser_id-i32-users.idin the dbtoken-String- one-time-use password tokenexp_date_utc-chrono::DateTime- the one-time-use password’s expiration date inUtcconsumed_date_utc-chrono::DateTimemost recent consume datetime inUtcmsg-String- message for helping debug from the client
Fields§
§id: i32§user_id: i32§token: String§email: String§state: i32§exp_date_utc: DateTime<Utc>§consumed_date_utc: Option<DateTime<Utc>>Trait Implementations§
Source§impl Clone for ModelUserOtp
impl Clone for ModelUserOtp
Source§fn clone(&self) -> ModelUserOtp
fn clone(&self) -> ModelUserOtp
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<'de> Deserialize<'de> for ModelUserOtp
impl<'de> Deserialize<'de> for ModelUserOtp
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
Auto Trait Implementations§
impl Freeze for ModelUserOtp
impl RefUnwindSafe for ModelUserOtp
impl Send for ModelUserOtp
impl Sync for ModelUserOtp
impl Unpin for ModelUserOtp
impl UnwindSafe for ModelUserOtp
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