pub struct OpenOptions(/* private fields */);Expand description
Describes the options for opening a file or directory.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub const CREATE_FILE: Self
pub const CREATE_FILE: Self
Create the file if it does not exist.
Sourcepub const CREATE_DIRECTORY: Self
pub const CREATE_DIRECTORY: Self
Create the directory if it does not exist. (doesn’t create parent directories)
Sourcepub const WRITE_TRUNCATE: Self
pub const WRITE_TRUNCATE: Self
Truncate the file to zero length if it already exists.
pub const fn from_bits(bits: u8) -> Self
pub const fn contains(self, other: Self) -> bool
pub const fn is_write(&self) -> bool
pub const fn is_write_truncate(&self) -> bool
pub const fn is_read(&self) -> bool
pub const fn create_file(&self) -> bool
pub const fn create_dir(&self) -> bool
Trait Implementations§
Source§impl BitOr for OpenOptions
impl BitOr for OpenOptions
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenOptions
impl Debug for OpenOptions
Source§impl PartialEq for OpenOptions
impl PartialEq for OpenOptions
Source§fn eq(&self, other: &OpenOptions) -> bool
fn eq(&self, other: &OpenOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for OpenOptions
impl Eq 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