pub struct CreateAttachment { /* private fields */ }Expand description
Filename and content of the CreateEmailBaseOptions attachment.
Limited to max 40mb per email.
Implementations§
Source§impl CreateAttachment
impl CreateAttachment
Sourcepub const fn from_content(content: Vec<u8>) -> Self
pub const fn from_content(content: Vec<u8>) -> Self
Creates a new Attachment from the content of an attached file.
Sourcepub fn from_path(path: &str) -> Self
pub fn from_path(path: &str) -> Self
Creates a new Attachment from the path where the attachment file is hosted.
Sourcepub fn with_filename(self, filename: &str) -> Self
pub fn with_filename(self, filename: &str) -> Self
Adds a filename to the attached file.
Sourcepub fn with_content_type(self, content_type: &str) -> Self
pub fn with_content_type(self, content_type: &str) -> Self
Adds a contenent type to the attached file.
Sourcepub fn with_inline_content_id(self, inline_content_id: &str) -> Self
👎Deprecated since 0.16.1: Parameter got internally renamed to just content_id. Use with_content_id instead.
pub fn with_inline_content_id(self, inline_content_id: &str) -> Self
Parameter got internally renamed to just content_id. Use with_content_id instead.
Adds an inline content id to the attached file.
pub fn with_content_id(self, content_id: &str) -> Self
Trait Implementations§
Source§impl Clone for CreateAttachment
impl Clone for CreateAttachment
Source§fn clone(&self) -> CreateAttachment
fn clone(&self) -> CreateAttachment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateAttachment
impl Debug for CreateAttachment
Source§impl From<&[u8]> for CreateAttachment
impl From<&[u8]> for CreateAttachment
Auto Trait Implementations§
impl Freeze for CreateAttachment
impl RefUnwindSafe for CreateAttachment
impl Send for CreateAttachment
impl Sync for CreateAttachment
impl Unpin for CreateAttachment
impl UnsafeUnpin for CreateAttachment
impl UnwindSafe for CreateAttachment
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