pub enum Mode {
ReadOnly,
ReadWriteAppend,
ReadWriteTruncate,
ReadWriteCreate,
ReadWriteCreateOrTruncate,
ReadWriteCreateOrAppend,
}
Expand description
The different ways we can open a file.
Variants§
ReadOnly
Open a file for reading, if it exists.
ReadWriteAppend
Open a file for appending (writing to the end of the existing file), if it exists.
ReadWriteTruncate
Open a file and remove all contents, before writing to the start of the existing file, if it exists.
ReadWriteCreate
Create a new empty file. Fail if it exists.
ReadWriteCreateOrTruncate
Create a new empty file, or truncate an existing file.
ReadWriteCreateOrAppend
Create a new empty file, or append to an existing file.
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.