pub struct FileOpenOptions {
pub read: bool,
pub write: bool,
pub create: bool,
pub append: bool,
pub truncate: bool,
}Expand description
Configuration for file operations
Fields§
§read: boolOpen for reading
write: boolOpen for writing
create: boolCreate if not exists
append: boolAppend mode
truncate: boolTruncate existing content
Implementations§
Source§impl FileOpenOptions
impl FileOpenOptions
Sourcepub fn read_only() -> FileOpenOptions
pub fn read_only() -> FileOpenOptions
Create options for read-only access
Sourcepub fn write_only() -> FileOpenOptions
pub fn write_only() -> FileOpenOptions
Create options for write-only access (creates if not exists)
Sourcepub fn append_only() -> FileOpenOptions
pub fn append_only() -> FileOpenOptions
Create options for append access
Sourcepub fn read_write() -> FileOpenOptions
pub fn read_write() -> FileOpenOptions
Create options for read-write access
Trait Implementations§
Source§impl Clone for FileOpenOptions
impl Clone for FileOpenOptions
Source§fn clone(&self) -> FileOpenOptions
fn clone(&self) -> FileOpenOptions
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 FileOpenOptions
impl Debug for FileOpenOptions
Source§impl Default for FileOpenOptions
impl Default for FileOpenOptions
Source§fn default() -> FileOpenOptions
fn default() -> FileOpenOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FileOpenOptions
impl RefUnwindSafe for FileOpenOptions
impl Send for FileOpenOptions
impl Sync for FileOpenOptions
impl Unpin for FileOpenOptions
impl UnsafeUnpin for FileOpenOptions
impl UnwindSafe for FileOpenOptions
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