pub trait OpenOptionsExt {
    // Required methods
    fn access_mode(&mut self, access: u32) -> &mut Self;
    fn share_mode(&mut self, val: u32) -> &mut Self;
    fn custom_flags(&mut self, flags: u32) -> &mut Self;
    fn attributes(&mut self, val: u32) -> &mut Self;
    fn security_qos_flags(&mut self, flags: u32) -> &mut Self;
}
Available on Windows only.
Expand description

Windows-specific extensions to [fs::OpenOptions].

Required Methods§

source

fn access_mode(&mut self, access: u32) -> &mut Self

Overrides the dwDesiredAccess argument to the call to [CreateFile] with the specified value.

source

fn share_mode(&mut self, val: u32) -> &mut Self

Overrides the dwShareMode argument to the call to [CreateFile] with the specified value.

source

fn custom_flags(&mut self, flags: u32) -> &mut Self

Sets extra flags for the dwFileFlags argument to the call to CreateFile2 to the specified value (or combines it with attributes and security_qos_flags to set the dwFlagsAndAttributes for CreateFile).

source

fn attributes(&mut self, val: u32) -> &mut Self

Sets the dwFileAttributes argument to the call to CreateFile2 to the specified value (or combines it with custom_flags and security_qos_flags to set the dwFlagsAndAttributes for CreateFile).

source

fn security_qos_flags(&mut self, flags: u32) -> &mut Self

Sets the dwSecurityQosFlags argument to the call to CreateFile2 to the specified value (or combines it with custom_flags and attributes to set the dwFlagsAndAttributes for CreateFile).

Object Safety§

This trait is not object safe.

Implementors§