pub struct AuthLetter { /* private fields */ }Expand description
One mail a panel’s auth sends: a plain-text mail to one address, carrying a live link or code
for every kind but AuthLetterKind::TwoFactorAlert.
It serializes, so an AuthMailDelivery can queue it, and mail rebuilds the
same mail each time, with the same Date and Message-ID: a letter sent twice after a crash
reads as one mail in a mail client. Its serialized form may change between releases, so a
queue drains before an upgrade, or drops what no longer deserializes.
A queued letter holds the link or code in clear: seal it before it reaches a database, a log
or a backup. Its Debug output leaves the subject and body out.
Implementations§
Source§impl AuthLetter
impl AuthLetter
Sourcepub fn kind(&self) -> AuthLetterKind
pub fn kind(&self) -> AuthLetterKind
What the letter is for.
Sourcepub fn expires_at(&self) -> Option<Timestamp>
pub fn expires_at(&self) -> Option<Timestamp>
When the link or code the letter carries stops working, or None for a letter that
carries none. A letter sent after it reads as broken: a queue drops it instead.
Trait Implementations§
Source§impl Clone for AuthLetter
impl Clone for AuthLetter
Source§fn clone(&self) -> AuthLetter
fn clone(&self) -> AuthLetter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthLetter
impl Debug for AuthLetter
Source§impl<'de> Deserialize<'de> for AuthLetter
impl<'de> Deserialize<'de> for AuthLetter
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthLetter, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthLetter, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for AuthLetter
Source§impl PartialEq for AuthLetter
impl PartialEq for AuthLetter
Source§impl Serialize for AuthLetter
impl Serialize for AuthLetter
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for AuthLetter
Auto Trait Implementations§
impl Freeze for AuthLetter
impl RefUnwindSafe for AuthLetter
impl Send for AuthLetter
impl Sync for AuthLetter
impl Unpin for AuthLetter
impl UnsafeUnpin for AuthLetter
impl UnwindSafe for AuthLetter
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T> Assign<Json<T>> for Twhere
T: Serialize,
impl<T> Assign<Json<T>> for Twhere
T: Serialize,
§fn into_assignment(self) -> Assignment<Json<T>>
fn into_assignment(self) -> Assignment<Json<T>>
Assignment<T>] value.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.