Struct params::File [] [src]

pub struct File(_);

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.

Methods

impl File
[src]

Attempts to open the file in read-only mode.

The path to the temporary file where the data was saved.

The filename that was specified in the request, unfiltered.

Warning

This may or may not be legal on the local filesystem, and so you should not blindly append it to a Path, as such behavior could easily be exploited by a malicious client.

The size of the file, in bytes.

Trait Implementations

impl FromValue for File
[src]

Extracts from File variant.

Returns Some if the conversion was successful, None otherwise.

impl Clone for File
[src]

This implementation does not copy or modify the underlying file.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for File
[src]

Formats the value using the given formatter.

impl PartialEq for File
[src]

Checks only for equality of the file's path.

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

This method tests for !=.

impl From<SavedFile> for File
[src]

Performs the conversion.