pub enum UnsubscribeMethod {
OneClickPost(String),
Mailto {
address: String,
subject: Option<String>,
body: Option<String>,
},
HttpsOnly(String),
None,
}Expand description
The opt-out method picked from a message’s unsubscribe headers, in
preference order: OneClickPost → Mailto → HttpsOnly → None.
Variants§
OneClickPost(String)
RFC 8058 one-click: POST List-Unsubscribe=One-Click
(application/x-www-form-urlencoded) to this URL. No browser
interaction needed.
Mailto
RFC 2369 mailto:: send an e-mail to this address. Per RFC 6068
the URL may carry ?subject= / ?body= that override our defaults.
HttpsOnly(String)
HTTPS URL exists but no one-click marker. Won’t auto-drive; the
caller should surface the URL for a manual click.
HTTPS only; plaintext http:// entries are ignored on purpose.
None
No List-Unsubscribe header at all.
Trait Implementations§
Source§impl Clone for UnsubscribeMethod
impl Clone for UnsubscribeMethod
Source§impl Debug for UnsubscribeMethod
impl Debug for UnsubscribeMethod
impl Eq for UnsubscribeMethod
Source§impl PartialEq for UnsubscribeMethod
impl PartialEq for UnsubscribeMethod
impl StructuralPartialEq for UnsubscribeMethod
Auto Trait Implementations§
impl Freeze for UnsubscribeMethod
impl RefUnwindSafe for UnsubscribeMethod
impl Send for UnsubscribeMethod
impl Sync for UnsubscribeMethod
impl Unpin for UnsubscribeMethod
impl UnsafeUnpin for UnsubscribeMethod
impl UnwindSafe for UnsubscribeMethod
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.