pub struct EmailRecipients {
pub to: Vec<EmailAddress>,
pub cc: Vec<EmailAddress>,
pub bcc: Vec<EmailAddress>,
}Expand description
Email recipients grouped by type
Fields§
§to: Vec<EmailAddress>To recipients
cc: Vec<EmailAddress>CC recipients (carbon copy)
bcc: Vec<EmailAddress>BCC recipients (blind carbon copy)
Implementations§
Source§impl EmailRecipients
impl EmailRecipients
Sourcepub fn new(to: Vec<EmailAddress>) -> Self
pub fn new(to: Vec<EmailAddress>) -> Self
Create new recipients with only ‘to’ addresses
Sourcepub fn with_cc_bcc(
to: Vec<EmailAddress>,
cc: Vec<EmailAddress>,
bcc: Vec<EmailAddress>,
) -> Self
pub fn with_cc_bcc( to: Vec<EmailAddress>, cc: Vec<EmailAddress>, bcc: Vec<EmailAddress>, ) -> Self
Create recipients with to, cc, and bcc
Sourcepub fn add_to(&mut self, recipient: EmailAddress)
pub fn add_to(&mut self, recipient: EmailAddress)
Add ‘to’ recipient
Sourcepub fn add_cc(&mut self, recipient: EmailAddress)
pub fn add_cc(&mut self, recipient: EmailAddress)
Add CC recipient
Sourcepub fn add_bcc(&mut self, recipient: EmailAddress)
pub fn add_bcc(&mut self, recipient: EmailAddress)
Add BCC recipient
Sourcepub fn all(&self) -> Vec<&EmailAddress>
pub fn all(&self) -> Vec<&EmailAddress>
Get all recipients
Trait Implementations§
Source§impl Clone for EmailRecipients
impl Clone for EmailRecipients
Source§impl Debug for EmailRecipients
impl Debug for EmailRecipients
Source§impl<'de> Deserialize<'de> for EmailRecipients
impl<'de> Deserialize<'de> for EmailRecipients
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 Freeze for EmailRecipients
impl RefUnwindSafe for EmailRecipients
impl Send for EmailRecipients
impl Sync for EmailRecipients
impl Unpin for EmailRecipients
impl UnsafeUnpin for EmailRecipients
impl UnwindSafe for EmailRecipients
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