pub struct OpenOptions {
pub read: bool,
pub write: Option<WriteMode>,
pub mode: i32,
pub ty: OpenFileType,
}
Expand description
Represents options to provide when opening a file or directory
Fields§
§read: bool
If true, opens a file (or directory) for reading
write: Option<WriteMode>
If provided, opens a file for writing or appending
mode: i32
Unix mode that is used when creating a new file
ty: OpenFileType
Whether opening a file or directory
Trait Implementations§
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 · 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 From<OpenOptions> for OpenFlags
impl From<OpenOptions> for OpenFlags
Source§fn from(opts: OpenOptions) -> Self
fn from(opts: OpenOptions) -> Self
Converts to this type from the input type.
Source§impl Hash for OpenOptions
impl Hash 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