pub struct UploadValue {
    pub filename: String,
    pub content_type: Option<String>,
    pub content: File,
}
Expand description

A file upload value.

Fields§

§filename: String

The name of the file.

§content_type: Option<String>

The content type of the file.

§content: File

The file data.

Implementations§

Attempt to clone the upload value. This type’s Clone implementation simply calls this and panics on failure.

Errors

Fails if cloning the inner File fails.

Convert to a Read.

Note: this is a synchronous/blocking reader.

Returns the size of the file, in bytes.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.