pub struct PhoneCode {
pub phone: String,
pub code: String,
pub issued_at: u64,
pub expires_at: u64,
pub attempts: u32,
}Expand description
Stored pending code. Same shape as MagicCode but keyed on phone.
Fields§
§phone: String§code: String§issued_at: u64Unix-epoch seconds when this code was minted. Used by the
resend-throttle calculation. Stored explicitly (not derived
from expires_at - TTL) so a TTL change between mint and
throttle-check doesn’t shift the throttle window.
expires_at: u64§attempts: u32Trait Implementations§
Source§impl<'de> Deserialize<'de> for PhoneCode
impl<'de> Deserialize<'de> for PhoneCode
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
impl Eq for PhoneCode
impl StructuralPartialEq for PhoneCode
Auto Trait Implementations§
impl Freeze for PhoneCode
impl RefUnwindSafe for PhoneCode
impl Send for PhoneCode
impl Sync for PhoneCode
impl Unpin for PhoneCode
impl UnsafeUnpin for PhoneCode
impl UnwindSafe for PhoneCode
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