pub struct OpenOptions { /* private fields */ }Expand description
Options and flags which can be used to configure how a file is opened.
Mirrors std::fs::OpenOptions without leaking the standard library type
into the abstraction.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn create(&mut self, create: bool) -> &mut Self
pub fn create(&mut self, create: bool) -> &mut Self
Sets the option to create the file if it does not exist.
Sourcepub fn create_new(&mut self, create_new: bool) -> &mut Self
pub fn create_new(&mut self, create_new: bool) -> &mut Self
Sets the option to create a new file, failing if it already exists.
Sourcepub fn get_append(&self) -> bool
pub fn get_append(&self) -> bool
Returns whether append mode is enabled.
Sourcepub fn get_truncate(&self) -> bool
pub fn get_truncate(&self) -> bool
Returns whether truncation is enabled.
Sourcepub fn get_create(&self) -> bool
pub fn get_create(&self) -> bool
Returns whether creating the file is enabled.
Sourcepub fn get_create_new(&self) -> bool
pub fn get_create_new(&self) -> bool
Returns whether creating a new file is enabled.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
impl Copy for OpenOptions
Source§impl Debug for OpenOptions
impl Debug for OpenOptions
Source§impl Default for OpenOptions
impl Default for OpenOptions
impl Eq for OpenOptions
Source§impl PartialEq for OpenOptions
impl PartialEq for OpenOptions
impl StructuralPartialEq 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 UnsafeUnpin 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