pub struct RefCountedTempFile { /* private fields */ }Expand description
A wrapper around a NamedTempFile that also contains
a reference to its parent temporary directory.
This type is Clone-able, allowing multiple references to the same underlying file. The file is deleted only when the last reference is dropped.
The parent temporary directory is also kept alive as long as any reference to this file exists, preventing premature cleanup of the directory.
Once all references to this file are dropped, the file is deleted, and the disk usage is subtracted from the disk manager’s total.
Implementations§
Trait Implementations§
Source§impl Clone for RefCountedTempFile
impl Clone for RefCountedTempFile
Source§impl Debug for RefCountedTempFile
impl Debug for RefCountedTempFile
Source§impl Drop for RefCountedTempFile
When the temporary file is dropped, subtract its disk usage from the disk manager’s total
impl Drop for RefCountedTempFile
When the temporary file is dropped, subtract its disk usage from the disk manager’s total
Source§impl SpillFile for RefCountedTempFile
impl SpillFile for RefCountedTempFile
Auto Trait Implementations§
impl !RefUnwindSafe for RefCountedTempFile
impl !UnwindSafe for RefCountedTempFile
impl Freeze for RefCountedTempFile
impl Send for RefCountedTempFile
impl Sync for RefCountedTempFile
impl Unpin for RefCountedTempFile
impl UnsafeUnpin for RefCountedTempFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more