[][src]Struct emailmessage::SinglePart

pub struct SinglePart<B = Body> { /* fields omitted */ }

Single part

Example

extern crate mime;
extern crate emailmessage;

use emailmessage::{SinglePart, header};

let part = SinglePart::builder()
     .header(header::ContentType("text/plain; charset=utf8".parse().unwrap()))
     .header(header::ContentTransferEncoding::Binary)
     .body("Текст письма в уникоде");

Methods

impl SinglePart<()>
[src]

Creates a default builder for singlepart

Creates a singlepart builder with 7bit encoding

Shortcut for SinglePart::builder().header(ContentTransferEncoding::SevenBit).

Creates a singlepart builder with quoted-printable encoding

Shortcut for SinglePart::builder().header(ContentTransferEncoding::QuotedPrintable).

Creates a singlepart builder with base64 encoding

Shortcut for SinglePart::builder().header(ContentTransferEncoding::Base64).

Creates a singlepart builder with 8-bit encoding

Shortcut for SinglePart::builder().header(ContentTransferEncoding::EightBit).

Creates a singlepart builder with binary encoding

Shortcut for SinglePart::builder().header(ContentTransferEncoding::Binary).

impl<B> SinglePart<B>
[src]

Get the transfer encoding

Get the headers from singlepart

Get a mutable reference to the headers

Read the body from singlepart

Converts singlepart into stream

Trait Implementations

impl<B> From<SinglePart<B>> for SinglePartStream<B> where
    B: Payload
[src]

Convert single part into boxed stream of binary chunks

Performs the conversion.

impl<B> From<SinglePart<B>> for Body where
    B: Payload,
    B::Data: IntoBuf,
    B::Error: Error + Send + Sync
[src]

Performs the conversion.

impl<B: Clone> Clone for SinglePart<B>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<B: Debug> Debug for SinglePart<B>
[src]

Formats the value using the given formatter. Read more

impl<B> Display for SinglePart<B> where
    B: AsRef<str>, 
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<B> Send for SinglePart<B> where
    B: Send

impl<B = Body> !Sync for SinglePart<B>

Blanket Implementations

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

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

Converts the given value to a String. Read more

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

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T