Struct rich_sdl2_rust::file::mode::OpenMode
source · 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 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