pub struct OpenOptions(/* private fields */);Expand description
Describes the options for opening a file or directory.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub const WRITE: OpenOptions
pub const WRITE: OpenOptions
Open the file for writing.
Sourcepub const READ: OpenOptions
pub const READ: OpenOptions
Open the file for reading.
Sourcepub const CREATE_FILE: OpenOptions
pub const CREATE_FILE: OpenOptions
Create the file if it does not exist.
Sourcepub const CREATE_DIRECTORY: OpenOptions
pub const CREATE_DIRECTORY: OpenOptions
Create the directory if it does not exist. (doesn’t create parent directories)
Sourcepub const WRITE_TRUNCATE: OpenOptions
pub const WRITE_TRUNCATE: OpenOptions
Truncate the file to zero length if it already exists.
pub const fn from_bits(bits: u8) -> OpenOptions
pub const fn contains(self, other: OpenOptions) -> 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§type Output = OpenOptions
type Output = OpenOptions
The resulting type after applying the
| operator.Source§fn bitor(self, other: OpenOptions) -> OpenOptions
fn bitor(self, other: OpenOptions) -> OpenOptions
Performs the
| operation. Read moreSource§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 · 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
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 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