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
sourceimpl Envelope
impl Envelope
sourcepub fn new(
from: Option<EmailAddress>,
to: Vec<EmailAddress>
) -> EmailResult<Envelope>
pub fn new(
from: Option<EmailAddress>,
to: Vec<EmailAddress>
) -> EmailResult<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
sourceimpl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
sourcefn 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
impl Eq for Envelope
impl StructuralEq for Envelope
impl StructuralPartialEq for Envelope
Auto Trait Implementations
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnwindSafe for Envelope
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more