pub struct OpenOptions {
pub read: bool,
pub write: bool,
pub append: bool,
pub truncate: bool,
pub create: bool,
pub create_new: bool,
}Expand description
Transparent replica of OpenOptions
This is a replica of
OpenOptions. Please see it’s
documentation for what which option means and how they interact.
There are From implementations to cast between this type and
fs::OpenOptions back and forth, but you shouldn’t rely on the
cast from fs::OpenOptions to this type to be stable and always
successful.
Fields§
§read: bool§write: bool§append: bool§truncate: bool§create: bool§create_new: boolImplementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub const fn read(&mut self, flag: bool) -> Self
pub const fn read(&mut self, flag: bool) -> Self
Sets the read flag
This function sets or resets the read flag and returns a
copy of it to enable method-style function chains.
Sourcepub const fn write(&mut self, flag: bool) -> Self
pub const fn write(&mut self, flag: bool) -> Self
Sets the write flag
This function sets or resets the write flag and returns a
copy of it to enable method-style function chains.
Sourcepub const fn append(&mut self, flag: bool) -> Self
pub const fn append(&mut self, flag: bool) -> Self
Sets the append flag
This function sets or resets the append flag and returns a
copy of it to enable method-style function chains.
Sourcepub const fn truncate(&mut self, flag: bool) -> Self
pub const fn truncate(&mut self, flag: bool) -> Self
Sets the truncate flag
This function sets or resets the truncate flag and returns a
copy of it to enable method-style function chains.
Sourcepub const fn create(&mut self, flag: bool) -> Self
pub const fn create(&mut self, flag: bool) -> Self
Sets the create flag
This function sets or resets the create flag and returns a
copy of it to enable method-style function chains.
Sourcepub const fn create_new(&mut self, flag: bool) -> Self
pub const fn create_new(&mut self, flag: bool) -> Self
Sets the create_new flag
This function sets or resets the create_new flag and returns
a copy of it to enable method-style function chains.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more