pub enum SaveMode {
Atomic,
Direct,
}Expand description
Strategy used when saving a settings file.
Variants§
Atomic
Write the new JSON to a temporary file, flush it, and replace the target.
This is the default mode. It avoids exposing a partially written final settings file if the process stops during the write step.
Direct
Write JSON directly to the final path.
This mode matches the v2.2.0 behavior and is useful for unusual filesystems, debugging, or applications that intentionally want direct overwrite semantics.
Trait Implementations§
impl Copy for SaveMode
impl Eq for SaveMode
impl StructuralPartialEq for SaveMode
Auto Trait Implementations§
impl Freeze for SaveMode
impl RefUnwindSafe for SaveMode
impl Send for SaveMode
impl Sync for SaveMode
impl Unpin for SaveMode
impl UnsafeUnpin for SaveMode
impl UnwindSafe for SaveMode
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