pub struct OpenFileOptions {
pub create: bool,
pub truncate: bool,
pub permissions: Option<u32>,
}Expand description
Options used when opening a writable file handle inside a lockbox.
Fields§
§create: boolCreate the file if it does not already exist.
truncate: boolTruncate the file to zero bytes when it is opened.
permissions: Option<u32>Unix-style permission bits to use for newly-created files.
Implementations§
Source§impl OpenFileOptions
impl OpenFileOptions
Sourcepub const fn existing() -> OpenFileOptions
pub const fn existing() -> OpenFileOptions
Open an existing file without creating or truncating it.
Sourcepub const fn create() -> OpenFileOptions
pub const fn create() -> OpenFileOptions
Open a file, creating it when it does not already exist.
Sourcepub const fn create_truncate() -> OpenFileOptions
pub const fn create_truncate() -> OpenFileOptions
Open a file, creating it when needed and truncating it to zero bytes.
Trait Implementations§
Source§impl Clone for OpenFileOptions
impl Clone for OpenFileOptions
Source§fn clone(&self) -> OpenFileOptions
fn clone(&self) -> OpenFileOptions
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 moreimpl Copy for OpenFileOptions
Source§impl Debug for OpenFileOptions
impl Debug for OpenFileOptions
Source§impl Default for OpenFileOptions
impl Default for OpenFileOptions
Source§fn default() -> OpenFileOptions
fn default() -> OpenFileOptions
Returns the “default value” for a type. Read more
impl Eq for OpenFileOptions
Source§impl PartialEq for OpenFileOptions
impl PartialEq for OpenFileOptions
impl StructuralPartialEq for OpenFileOptions
Auto Trait Implementations§
impl Freeze for OpenFileOptions
impl RefUnwindSafe for OpenFileOptions
impl Send for OpenFileOptions
impl Sync for OpenFileOptions
impl Unpin for OpenFileOptions
impl UnsafeUnpin for OpenFileOptions
impl UnwindSafe for OpenFileOptions
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