pub struct TempFile { /* private fields */ }Expand description
Managed temporary file. Deleted when the inner handle is dropped.
Implementations§
Source§impl TempFile
impl TempFile
Sourcepub fn with_extension(ext: &str) -> AppResult<Self>
pub fn with_extension(ext: &str) -> AppResult<Self>
Create a temporary file with the given extension.
Sourcepub fn in_dir_with_extension(dir: &Path, ext: &str) -> AppResult<Self>
pub fn in_dir_with_extension(dir: &Path, ext: &str) -> AppResult<Self>
Create a temporary file in the given directory with the given extension.
Sourcepub fn into_source(self) -> FileSource
pub fn into_source(self) -> FileSource
Convert this temp file into a super::FileSource.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TempFile
impl RefUnwindSafe for TempFile
impl Send for TempFile
impl Sync for TempFile
impl Unpin for TempFile
impl UnsafeUnpin for TempFile
impl UnwindSafe for TempFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more