Struct swap::file_truncator::FileTruncator
source · pub struct FileTruncator {
worker: Option<WorkerThread<Result<File>>>,
}
Expand description
Truncates a file to length 0, in the background when possible.
Truncating a large file can result in a significant amount of IO when updating filesystem metadata. When possible, FileTruncator truncates a given file gradually over time to avoid competing with higher prioirty IO.
Fields§
§worker: Option<WorkerThread<Result<File>>>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FileTruncator
impl Send for FileTruncator
impl Sync for FileTruncator
impl Unpin for FileTruncator
impl !UnwindSafe for FileTruncator
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