pub struct EmailAttachment {
pub filename: String,
pub content_type: String,
pub content: Vec<u8>,
pub content_id: Option<String>,
pub inline: bool,
}Expand description
Email attachment
Fields§
§filename: StringFile name
content_type: StringContent type (MIME type)
content: Vec<u8>File content (base64 encoded)
content_id: Option<String>Content ID for inline attachments
inline: boolWhether this is an inline attachment
Implementations§
Source§impl EmailAttachment
impl EmailAttachment
Sourcepub fn new(
filename: impl Into<String>,
content_type: impl Into<String>,
content: Vec<u8>,
) -> Self
pub fn new( filename: impl Into<String>, content_type: impl Into<String>, content: Vec<u8>, ) -> Self
Create new attachment from bytes
Trait Implementations§
Source§impl Clone for EmailAttachment
impl Clone for EmailAttachment
Source§impl Debug for EmailAttachment
impl Debug for EmailAttachment
Source§impl<'de> Deserialize<'de> for EmailAttachment
impl<'de> Deserialize<'de> for EmailAttachment
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 EmailAttachment
impl RefUnwindSafe for EmailAttachment
impl Send for EmailAttachment
impl Sync for EmailAttachment
impl Unpin for EmailAttachment
impl UnsafeUnpin for EmailAttachment
impl UnwindSafe for EmailAttachment
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