Struct awmp::File

source · []
pub struct File { /* private fields */ }
Expand description

A tempfile wrapper that includes the original filename

Implementations

The filename provided in the multipart/form-data request

The sanitized version of the original file name, or generated name if none provided

👎 Deprecated since 0.5.4:

Please use the ‘persist_in’ function instead

Persist the tempfile to an existing directory. Uses the sanitized file name and returns the full path

NOTE: Because of how temporary file is stored, it cannot be persisted across filesystems. Also neither the file contents nor the containing directory are synchronized, so the update may not yet have reached the disk when persist returns.

Persist the tempfile to an existing directory. Uses the sanitized file name and returns the full path

NOTE: Because of how temporary file is stored, it cannot be persisted across filesystems. Also neither the file contents nor the containing directory are synchronized, so the update may not yet have reached the disk when persist_in returns.

Persist the tempfile at the specified file path.

NOTE: Because of how temporary file is stored, it cannot be persisted across filesystems. Also neither the file contents nor the containing directory are synchronized, so the update may not yet have reached the disk when persist_at returns.

Persist the tempfile with specific permissions on Unix

NOTE: Because of how temporary file is stored, it cannot be persisted across filesystems. Also neither the file contents nor the containing directory are synchronized, so the update may not yet have reached the disk when persist_with_permissions returns.

Persist the tempfile with 644 permissions on Unix

NOTE: Because of how temporary file is stored, it cannot be persisted across filesystems. Also neither the file contents nor the containing directory are synchronized, so the update may not yet have reached the disk when persist_with_open_permissions returns.

Trait Implementations

Performs the conversion.

Performs the conversion.

Formats the value using the given formatter. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more