Struct sendgrid_api::Attachment [−][src]
pub struct Attachment { /* fields omitted */ }
An attachment block for a V3 message. Content and filename are required. If the mime_type is unspecified, the email will use Sendgrid’s default for attachments which is ‘application/octet-stream’.
Implementations
impl Attachment
[src]
impl Attachment
[src]pub fn new() -> Attachment
[src]
pub fn new() -> Attachment
[src]Construct a new attachment for this message.
pub fn set_content(self, c: &[u8]) -> Attachment
[src]
pub fn set_content(self, c: &[u8]) -> Attachment
[src]The raw body of the attachment.
pub fn set_base64_content(self, c: &str) -> Attachment
[src]
pub fn set_base64_content(self, c: &str) -> Attachment
[src]The base64 body of the attachment.
pub fn set_filename(self, filename: &str) -> Attachment
[src]
pub fn set_filename(self, filename: &str) -> Attachment
[src]Sets the filename for the attachment.
pub fn set_mime_type(self, mime: &str) -> Attachment
[src]
pub fn set_mime_type(self, mime: &str) -> Attachment
[src]Set an optional mime type. Sendgrid will default to ‘application/octet-stream’ if unspecified.
Trait Implementations
impl Default for Attachment
[src]
impl Default for Attachment
[src]fn default() -> Attachment
[src]
fn default() -> Attachment
[src]Returns the “default value” for a type. Read more
impl Serialize for Attachment
[src]
impl Serialize for Attachment
[src]Auto Trait Implementations
impl RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl UnwindSafe for Attachment
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]