pub struct VerificationSnapshot { /* private fields */ }Expand description
Actual verification data, without manufacturing a database model or ID. Cached find preserves every truthy JSON value and safeJSONParse’s ISO date reviver. Consume separately hydrates expiresAt before its liveness gate.
Implementations§
Source§impl VerificationSnapshot
impl VerificationSnapshot
pub fn from_model<T: AuthVerification + Clone + Send + Sync + 'static>( model: &T, ) -> Self
pub fn data(&self) -> &JsValue
pub fn original_model<T: Any>(&self) -> Option<&T>
Sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
An absent ID is a real secondary-only snapshot, not a synthetic ID.
pub fn identifier(&self) -> AuthResult<&str>
pub fn value(&self) -> AuthResult<&str>
pub fn expires_at(&self) -> AuthResult<DateTime<Utc>>
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Source compares the actual cached field to a Date. ISO-Z values were revived; other strings retain their numeric relational coercion.
Trait Implementations§
Source§impl Clone for VerificationSnapshot
impl Clone for VerificationSnapshot
Auto Trait Implementations§
impl !RefUnwindSafe for VerificationSnapshot
impl !UnwindSafe for VerificationSnapshot
impl Freeze for VerificationSnapshot
impl Send for VerificationSnapshot
impl Sync for VerificationSnapshot
impl Unpin for VerificationSnapshot
impl UnsafeUnpin for VerificationSnapshot
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