pub struct Mail { /* private fields */ }Implementations§
Source§impl Mail
impl Mail
Sourcepub fn new(to: Address, subject: &str, body: Body) -> Result<Self>
pub fn new(to: Address, subject: &str, body: Body) -> Result<Self>
The subject is one header line: no control or invisible formatting characters, at most 255 characters.
Sourcepub fn bulk(self, list: &str) -> Result<Self>
pub fn bulk(self, list: &str) -> Result<Self>
Sent with a one-click unsubscribe link (RFC 8058) to its one recipient, and not at all
to an address that unsubscribed from list or complained of bulk mail.
pub fn list(&self) -> Option<&str>
pub fn unsubscribe(&self) -> Option<&str>
pub fn also_to(self, address: Address) -> Self
pub fn replying_to(self, address: Address) -> Self
pub fn sent_from(self, address: Address) -> Self
pub fn from(&self) -> Option<&Address>
pub fn to(&self) -> &[Address]
pub fn reply_to(&self) -> Option<&Address>
pub fn subject(&self) -> &str
pub fn body(&self) -> &Body
Trait Implementations§
Source§impl Debug for Mail
Addresses masked, subject and body left out: either may carry personal data.
impl Debug for Mail
Addresses masked, subject and body left out: either may carry personal data.
Source§impl<'de> Deserialize<'de> for Mail
impl<'de> Deserialize<'de> for Mail
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 Forget for Mail
impl Freeze for Mail
impl RefUnwindSafe for Mail
impl Send for Mail
impl Sync for Mail
impl Unpin for Mail
impl UnsafeUnpin for Mail
impl UnwindSafe for Mail
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