[−][src]Struct awmp::File
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]
Persist the tempfile to an existing directory. Uses the sanitized file name and returns the full path
impl File[src]
pub fn persist_with_permissions<P: AsRef<Path>>(
self,
dir: P,
mode: u32
) -> Result<PathBuf, Error>[src]
self,
dir: P,
mode: u32
) -> Result<PathBuf, Error>
Persist the tempfile with specific permissions on Unix
pub fn persist_with_open_permissions<P: AsRef<Path>>(
self,
dir: P
) -> Result<PathBuf, Error>[src]
self,
dir: P
) -> Result<PathBuf, Error>
Persist the tempfile with 644 permissions on Unix
Trait Implementations
impl AsMut<NamedTempFile> for File[src]
fn as_mut(&mut self) -> &mut NamedTempFile[src]
impl AsRef<NamedTempFile> for File[src]
fn as_ref(&self) -> &NamedTempFile[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,