Struct formdata::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]

[src]

[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.

[src]

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

[src]

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

[src]

Mime content-type specified in the header

Trait Implementations

impl Clone for FilePart
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for FilePart
[src]

[src]

impl Debug for FilePart
[src]

[src]

Formats the value using the given formatter.

impl PartialEq<FilePart> for FilePart
[src]

[src]

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

[src]

This method tests for !=.