pub enum WriteMode {
Truncate,
Append,
}
Expand description
The possible ways to open a file for writing.
Variants§
Truncate
If the file does not exist, creates it as an empty file. If it does exist, deletes its contents. In either case, returns a handle with initial position zero.
Append
If the file does not exist, creates it as an empty file. If it does exist, leaves its contents intact. In either case, returns a handle initially positioned at the end of the file.
Trait Implementations§
Source§impl Ord for WriteMode
impl Ord for WriteMode
Source§impl PartialOrd for WriteMode
impl PartialOrd for WriteMode
impl Copy for WriteMode
impl Eq for WriteMode
impl StructuralPartialEq 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 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