pub struct Attachment {
pub content: String,
pub mime_type: String,
pub filename: String,
pub disposition: Option<String>,
pub content_id: Option<String>,
}
Expand description
Represents an email attachment.
Fields§
§content: String
The Base64 encoded content of the attachment.
mime_type: String
The mime type of the attachment (e.g. “image/jpeg”).
filename: String
The filename of the attachment.
disposition: Option<String>
The content-disposition of the attachment specifying how you would like the attachment to be displayed.
Supported values are “attachment” or “inline”. Defaults to “attachment”.
For example, “inline” results in the attached file being displayed automatically within the message, while “attachment” results in the attached file requiring some action to be taken before it is displayed (e.g. opening or downloading the file).
content_id: Option<String>
The attachment’s unique content identifier.
This is used when the disposition is set to “inline” and the attachment is an image, allowing the file to be displayed within the body of your email.
<img src="cid:ii_139db99fdb5c3704"></img>
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Attachment
impl Debug for Attachment
Source§impl Default for Attachment
impl Default for Attachment
Source§fn default() -> Attachment
fn default() -> Attachment
Source§impl<'de> Deserialize<'de> for Attachment
impl<'de> Deserialize<'de> for Attachment
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>,
Auto Trait Implementations§
impl Freeze for Attachment
impl RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl UnwindSafe for Attachment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request