pub struct AtomicFile(/* private fields */);Expand description
The streaming form of write_file: the bytes go into a sibling of the target, commit puts
it in place in one step (readers see the old file or all of the new one); dropped without
commit, the sibling is removed and the target is unchanged. Checked and routed like
write_file when it is created. OS paths: an exclusive “NAME.tmp-PID-SEQ-TIME” beside the
file, fsync and rename (Linux keeps the old file’s access bits; the browser: in memory until
commit). Mounts: a “NAME.tmp-..” file of the mount, renamed by the provider (one without
rename gets the whole file written); a provider whose rename cannot replace a file
(atomic_rename() == false, content://) gets the bytes written in place at commit.
Implementations§
Source§impl AtomicFile
impl AtomicFile
Trait Implementations§
Source§impl Drop for AtomicFile
impl Drop for AtomicFile
Auto Trait Implementations§
impl !Freeze for AtomicFile
impl !RefUnwindSafe for AtomicFile
impl !UnwindSafe for AtomicFile
impl Forget for AtomicFile
impl Send for AtomicFile
impl Sync for AtomicFile
impl Unpin for AtomicFile
impl UnsafeUnpin for AtomicFile
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