[][src]Struct sendgrid_async::Attachment

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]

pub fn new() -> Attachment[src]

Construct a new attachment for this message.

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]

The base64 body of the attachment.

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]

Set an optional mime type. Sendgrid will default to 'application/octet-stream' if unspecified.

Trait Implementations

impl Default for Attachment[src]

impl Serialize for Attachment[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,