#[non_exhaustive]pub enum WriteMode {
CreateNew,
Overwrite,
UpdateOnly,
Truncate,
}Expand description
Write mode for file operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CreateNew
Fail if file already exists.
Overwrite
Overwrite existing file (default, like >).
UpdateOnly
Fail if file does not exist.
Truncate
Explicitly truncate file before writing.
Trait Implementations§
impl Copy for WriteMode
Auto Trait Implementations§
impl Freeze for WriteMode
impl RefUnwindSafe for WriteMode
impl Send for WriteMode
impl Sync for WriteMode
impl Unpin for WriteMode
impl UnsafeUnpin for WriteMode
impl UnwindSafe for WriteMode
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