Struct mailgun_rs::Message
source · pub struct Message {
pub to: Vec<EmailAddress>,
pub cc: Vec<EmailAddress>,
pub bcc: Vec<EmailAddress>,
pub subject: String,
pub text: String,
pub html: String,
pub template: String,
pub template_vars: HashMap<String, String>,
pub template_json: Option<Value>,
}
Fields§
§to: Vec<EmailAddress>
§cc: Vec<EmailAddress>
§bcc: Vec<EmailAddress>
§subject: String
§text: String
§html: String
§template: String
§template_vars: HashMap<String, String>
§template_json: Option<Value>
Implementations§
source§impl Message
impl Message
sourcepub fn builder() -> MessageBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> MessageBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building Message
.
On the builder, call .to(...)
, .cc(...)
(optional), .bcc(...)
(optional), .subject(...)
, .text(...)
(optional), .html(...)
(optional), .template(...)
(optional), .template_vars(...)
(optional), .template_json(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of Message
.
Trait Implementations§
source§impl PartialEq for Message
impl PartialEq for Message
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.