Struct fs_err::OpenOptions
source · [−]pub struct OpenOptions(_);Expand description
Wrapper around std::fs::OptionOptions
Implementations
sourceimpl OpenOptions
impl OpenOptions
sourcepub fn new() -> Self
pub fn new() -> Self
Wrapper for std::fs::OpenOptions::new
sourcepub fn read(&mut self, read: bool) -> &mut Self
pub fn read(&mut self, read: bool) -> &mut Self
Wrapper for std::fs::OpenOptions::read
sourcepub fn write(&mut self, write: bool) -> &mut Self
pub fn write(&mut self, write: bool) -> &mut Self
Wrapper for std::fs::OpenOptions::write
sourcepub fn append(&mut self, append: bool) -> &mut Self
pub fn append(&mut self, append: bool) -> &mut Self
Wrapper for std::fs::OpenOptions::append
sourcepub fn truncate(&mut self, truncate: bool) -> &mut Self
pub fn truncate(&mut self, truncate: bool) -> &mut Self
Wrapper for std::fs::OpenOptions::truncate
sourcepub fn create(&mut self, create: bool) -> &mut Self
pub fn create(&mut self, create: bool) -> &mut Self
Wrapper for std::fs::OpenOptions::create
sourcepub fn create_new(&mut self, create_new: bool) -> &mut Self
pub fn create_new(&mut self, create_new: bool) -> &mut Self
Wrapper for std::fs::OpenOptions::create_new
sourceimpl OpenOptions
impl OpenOptions
Methods added by fs-err that are not available on
std::fs::OpenOptions.
sourcepub fn from_options(options: OpenOptions) -> Self
pub fn from_options(options: OpenOptions) -> Self
Constructs Self from std::fs::OpenOptions
sourcepub fn options(&self) -> &OpenOptions
pub fn options(&self) -> &OpenOptions
Returns a reference to the underlying std::fs::OpenOptions.
Note that calling open() on this reference will NOT give you the improved errors from fs-err.
sourcepub fn options_mut(&mut self) -> &mut OpenOptions
pub fn options_mut(&mut self) -> &mut OpenOptions
Returns a mutable reference to the underlying std::fs::OpenOptions.
This allows you to change settings that don’t yet have wrappers in fs-err.
Note that calling open() on this reference will NOT give you the improved errors from fs-err.
Trait Implementations
sourceimpl Clone for OpenOptions
impl Clone for OpenOptions
sourcefn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for OpenOptions
impl Debug for OpenOptions
sourceimpl OpenOptionsExt for OpenOptions
impl OpenOptionsExt for OpenOptions
sourcefn mode(&mut self, mode: u32) -> &mut Self
fn mode(&mut self, mode: u32) -> &mut Self
Wrapper for OpenOptionsExt::mode
sourcefn custom_flags(&mut self, flags: i32) -> &mut Self
fn custom_flags(&mut self, flags: i32) -> &mut Self
Wrapper for OpenOptionsExt::custom_flags
Auto Trait Implementations
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnwindSafe for OpenOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more