Struct mime_multipart::FilePart [] [src]

pub struct FilePart {
    pub headers: Headers,
    pub path: PathBuf,
    pub size: Option<usize>,
    // some fields omitted
}

A file that is to be inserted into a multipart/* or alternatively an uploaded file that was received as part of multipart/* parsing.

Fields

The headers of the part

A temporary file containing the file content

Optionally, the size of the file. This is filled when multiparts are parsed, but is not necessary when they are generated.

Methods

impl FilePart
[src]

If you do not want the file on disk to be deleted when Self drops, call this function. It will become your responsability to clean up.

Create a new temporary FilePart (when created this way, the file will be deleted once the FilePart object goes out of scope).

Filename that was specified when the file was uploaded. Returns Ok<None> if there was no content-disposition header supplied.

Mime content-type specified in the header

Trait Implementations

impl PartialEq for FilePart
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for FilePart
[src]

Formats the value using the given formatter.

impl Clone for FilePart
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for FilePart
[src]

A method called when the value goes out of scope. Read more