Struct async_smtp::Envelope
source · pub struct Envelope { /* private fields */ }
Expand description
Simple email envelope representation
We only accept mailboxes, and do not support source routes (as per RFC).
Implementations§
source§impl Envelope
impl Envelope
sourcepub fn new(
from: Option<EmailAddress>,
to: Vec<EmailAddress>
) -> Result<Envelope>
pub fn new( from: Option<EmailAddress>, to: Vec<EmailAddress> ) -> Result<Envelope>
Creates a new envelope, which may fail if to
is empty.
sourcepub fn to(&self) -> &[EmailAddress]
pub fn to(&self) -> &[EmailAddress]
Destination addresses of the envelope
sourcepub fn from(&self) -> Option<&EmailAddress>
pub fn from(&self) -> Option<&EmailAddress>
Source address of the envelope
Trait Implementations§
source§impl PartialEq for Envelope
impl PartialEq for Envelope
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 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