[][src]Struct awmp::File

pub struct File { /* fields omitted */ }

A tempfile wrapper that includes the original filename

Implementations

impl File[src]

pub fn into_inner(self) -> NamedTempFile[src]

pub fn original_file_name(&self) -> Option<&str>[src]

The filename provided in the multipart/form-data request

pub fn sanitized_file_name(&self) -> &str[src]

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

pub fn persist<P: AsRef<Path>>(self, dir: P) -> Result<PathBuf, Error>[src]

👎 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

pub fn persist_in<P: AsRef<Path>>(self, dir: P) -> Result<PathBuf, Error>[src]

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

pub fn persist_at<P: AsRef<Path>>(self, path: P) -> Result<File, Error>[src]

Persist the tempfile at the specified file path.

impl File[src]

pub fn persist_with_permissions<P: AsRef<Path>>(
    self,
    dir: P,
    mode: u32
) -> Result<PathBuf, Error>
[src]

Persist the tempfile with specific permissions on Unix

pub fn persist_with_open_permissions<P: AsRef<Path>>(
    self,
    dir: P
) -> Result<PathBuf, Error>
[src]

Persist the tempfile with 644 permissions on Unix

Trait Implementations

impl AsMut<NamedTempFile> for File[src]

impl AsRef<NamedTempFile> for File[src]

impl Debug for File[src]

Auto Trait Implementations

impl RefUnwindSafe for File

impl Send for File

impl Sync for File

impl Unpin for File

impl UnwindSafe for File

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,