pub struct OpenOptions {
pub read: bool,
pub write: bool,
pub append: bool,
pub truncate: bool,
pub create: bool,
pub create_new: bool,
}
Expand description
OpenOptions for open()
.
Fields§
§read: bool
open for reading
write: bool
open for writing
append: bool
open in write-append mode
truncate: bool
truncate file first when writing
create: bool
create file if it doesn’t exist
create_new: bool
must create new file, fail if it already exists.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OpenOptions
impl Debug for OpenOptions
Source§impl Default for OpenOptions
impl Default for OpenOptions
Source§fn default() -> OpenOptions
fn default() -> OpenOptions
Returns the “default value” for a type. Read more
impl Copy for OpenOptions
Auto Trait Implementations§
impl Freeze for OpenOptions
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnwindSafe for OpenOptions
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