pub struct Recipient {
pub email: String,
pub name: String,
}Expand description
Email recipient composed by an email address and the name of the owner
Fields§
§email: String§name: StringImplementations§
Source§impl Recipient
impl Recipient
Sourcepub fn with_name(email: &str, name: &str) -> Self
pub fn with_name(email: &str, name: &str) -> Self
Creates a new Recipient instance with an email and
a name
Sourcepub fn from_comma_separated(recipients: &str) -> Vec<Self>
pub fn from_comma_separated(recipients: &str) -> Vec<Self>
Creates a Vec<Recipient from an string slice of comma separated
emails.
This function does not support recipients with name provided as string.
Sourcepub fn as_comma_separated(&self) -> String
pub fn as_comma_separated(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Recipient
impl<'de> Deserialize<'de> for Recipient
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 Recipient
impl RefUnwindSafe for Recipient
impl Send for Recipient
impl Sync for Recipient
impl Unpin for Recipient
impl UnwindSafe for Recipient
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