Struct formdata::uploaded_file::UploadedFile [] [src]

pub struct UploadedFile {
    pub path: PathBuf,
    pub filename: Option<String>,
    pub content_type: Mime,
    pub size: usize,
    // some fields omitted
}

An uploaded file that was received as part of multipart/form-data parsing.

Files are streamed to disk because they may not fit in memory.

Fields

path

The temporary file where the data was saved.

filename

The filename that was specified in the data, unfiltered. It may or may not be legal on the local filesystem.

content_type

The unvalidated content-type that was specified in the data.

size

The size of the file.

Methods

impl UploadedFile

fn new(content_type: Mime) -> Result<UploadedFile, Error>

Trait Implementations

impl Deserialize for UploadedFile

fn deserialize<__D>(deserializer: &mut __D) -> Result<UploadedFile, __D::Error> where __D: Deserializer

impl Serialize for UploadedFile

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

impl Drop for UploadedFile

fn drop(&mut self)

Derived Implementations

impl PartialEq for UploadedFile

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

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

impl Debug for UploadedFile

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

impl Clone for UploadedFile

fn clone(&self) -> UploadedFile

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