[][src]Struct melib::email::attachments::AttachmentBuilder

pub struct AttachmentBuilder {
    pub content_type: ContentType,
    pub content_transfer_encoding: ContentTransferEncoding,
    pub content_disposition: ContentDisposition,
    pub raw: Vec<u8>,
    pub body: StrBuilder,
}

Fields

content_type: ContentTypecontent_transfer_encoding: ContentTransferEncodingcontent_disposition: ContentDispositionraw: Vec<u8>body: StrBuilder

Implementations

impl AttachmentBuilder[src]

pub fn new(content: &[u8]) -> Self[src]

pub fn raw(&self) -> &[u8][src]

pub fn body(&self) -> &[u8][src]

pub fn set_raw(&mut self, raw: Vec<u8>) -> &mut Self[src]

pub fn set_body_to_raw(&mut self) -> &mut Self[src]

Set body to the entire raw contents, use this if raw contains only data and no headers If raw contains data and headers pass it through AttachmentBuilder::new().

pub fn set_content_type(&mut self, val: ContentType) -> &mut Self[src]

pub fn content_type(&self) -> &ContentType[src]

pub fn set_content_transfer_encoding(
    &mut self,
    val: ContentTransferEncoding
) -> &mut Self
[src]

pub fn set_content_disposition(&mut self, val: ContentDisposition) -> &mut Self[src]

pub fn content_disposition(&self) -> &ContentDisposition[src]

pub fn content_transfer_encoding(&self) -> &ContentTransferEncoding[src]

pub fn set_content_type_from_bytes(&mut self, value: &[u8]) -> &mut Self[src]

pub fn build(self) -> Attachment[src]

pub fn parts(raw: &[u8], boundary: &[u8]) -> Vec<Attachment>[src]

Trait Implementations

impl Clone for AttachmentBuilder[src]

impl Debug for AttachmentBuilder[src]

impl Default for AttachmentBuilder[src]

impl<'de> Deserialize<'de> for AttachmentBuilder[src]

impl Eq for AttachmentBuilder[src]

impl From<Attachment> for AttachmentBuilder[src]

impl From<AttachmentBuilder> for Attachment[src]

impl PartialEq<AttachmentBuilder> for AttachmentBuilder[src]

impl Serialize for AttachmentBuilder[src]

impl StructuralEq for AttachmentBuilder[src]

impl StructuralPartialEq for AttachmentBuilder[src]

Auto Trait Implementations

impl RefUnwindSafe for AttachmentBuilder

impl Send for AttachmentBuilder

impl Sync for AttachmentBuilder

impl Unpin for AttachmentBuilder

impl UnwindSafe for AttachmentBuilder

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>, 

impl<T> WithSubscriber for T[src]