Struct mime_multipart::FilePart [] [src]

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

An uploaded file that was received as part of multipart/* parsing. Files are streamed to disk to conserve memory (files are potentially very large)

Fields

headers: Headers

The complete headers that were sent along with the file body.

path: PathBuf

The temporary file where the file body was saved.

size: usize

The size of the file.

Methods

impl FilePart
[src]

fn new(headers: Headers) -> Result<FilePartError>

fn filename(&self) -> Result<Option<String>, Error>

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

fn content_type(&self) -> Option<Mime>

Mime content-type specified in the header

Trait Implementations

impl PartialEq for FilePart
[src]

fn eq(&self, __arg_0: &FilePart) -> bool

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

fn ne(&self, __arg_0: &FilePart) -> bool

This method tests for !=.

impl Debug for FilePart
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for FilePart
[src]

fn clone(&self) -> FilePart

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Drop for FilePart
[src]

fn drop(&mut self)

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