pub struct Envelope { /* private fields */ }Expand description
SMTP envelope with transport sender and recipients.
Implementations§
Source§impl Envelope
impl Envelope
Sourcepub const fn new(sender: EnvelopeSender) -> Self
pub const fn new(sender: EnvelopeSender) -> Self
Creates an envelope with no recipients.
Sourcepub fn with_recipient(self, recipient: EnvelopeRecipient) -> Self
pub fn with_recipient(self, recipient: EnvelopeRecipient) -> Self
Adds a recipient and returns the updated envelope.
Sourcepub fn push_recipient(&mut self, recipient: EnvelopeRecipient)
pub fn push_recipient(&mut self, recipient: EnvelopeRecipient)
Appends a recipient.
Sourcepub const fn sender(&self) -> &EnvelopeSender
pub const fn sender(&self) -> &EnvelopeSender
Returns the envelope sender.
Sourcepub fn recipients(&self) -> &[EnvelopeRecipient]
pub fn recipients(&self) -> &[EnvelopeRecipient]
Returns envelope recipients.
Trait Implementations§
impl Eq for Envelope
impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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