pub struct OpenMode { /* private fields */ }
Expand description
A builder for an open mode of super::RwOps
.
Implementations§
Source§impl OpenMode
impl OpenMode
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs an empty mode. Please do not pass this into super::RwOps
as is.
Sourcepub fn append(&mut self, append: bool) -> &mut Self
pub fn append(&mut self, append: bool) -> &mut Self
Sets to force to append. Setting true will disable to be able to write.
Sourcepub fn write(&mut self, write: bool) -> &mut Self
pub fn write(&mut self, write: bool) -> &mut Self
Sets to force to write. Setting true will disable to be able to append.
Sourcepub fn truncate(&mut self, truncate: bool) -> &mut Self
pub fn truncate(&mut self, truncate: bool) -> &mut Self
Sets to force to truncate, overwriting all of a file.
Trait Implementations§
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