[][src]Struct mail_core::Data

pub struct Data { /* fields omitted */ }

A type containing some data and metadata for it.

This often, but not always, corresponds to data which could potentially have been a file in a file system. For example a image or a text document.

This type is mainly used when having auto generated content as content provided through a file should be loaded from a source and as such will be directly loaded and transfer encoded.

Clone

Data is made to be cheap to clone and share. For this it uses Arc internally.

Methods

impl Data
[src]

Create a new data instance.

Access the raw data buffer of this instance.

Access the metadata.

Access the file meta metadata.Fn

Access the content type.

Access the content id.

Transfer encode the given data.

This function will be called by the context implementation when loading and/or transfer encoding data. The context implementation might also not call it if it has a cached version of the transfer encoded data.

This functions expect a boundary pool and will remove all boundaries which do appear in the encoded representation of the data.

Trait Implementations

impl Clone for Data
[src]

Performs copy-assignment from source. Read more

impl Debug for Data
[src]

Auto Trait Implementations

impl Send for Data

impl Sync for Data

Blanket Implementations

impl<T> From for T
[src]

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

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

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.

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

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

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.

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

impl<F, T> HeaderTryInto for F where
    T: HeaderTryFrom<F>, 
[src]

impl<T> HeaderTryFrom for T
[src]

impl<T> Erased for T