#[repr(C)]pub enum OpenMode {
ReadOnly {
non_blocking: bool,
},
WriteOnly {
append: bool,
create: bool,
exclusive: bool,
truncate: bool,
non_blocking: bool,
},
ReadWrite {
append: bool,
create: bool,
exclusive: bool,
truncate: bool,
non_blocking: bool,
},
}
Expand description
The ways in which we can open a file.
TODO: Replace all these booleans with a u8 flag-set
Variants§
ReadOnly
Open file in read-only mode. No writes allowed. One file can be opened in read-only mode multiple times.
WriteOnly
Open a file for writing, but not reading.
Fields
ReadWrite
Open a file for reading and writing.
Auto Trait Implementations§
impl Freeze for OpenMode
impl RefUnwindSafe for OpenMode
impl Send for OpenMode
impl Sync for OpenMode
impl Unpin for OpenMode
impl UnwindSafe for OpenMode
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