pub struct DISPOSITION(/* private fields */);
kernel
only.Expand description
HFILE::CreateFile
creation_disposition
(u32
).
Originally has no prefix.
Implementations§
Source§impl DISPOSITION
impl DISPOSITION
Sourcepub const unsafe fn as_mut(&mut self) -> &mut u32
pub const unsafe fn as_mut(&mut self) -> &mut u32
Returns a mutable reference to the underlying raw value.
§Safety
Be sure the integer being set is meaningful for the actual type.
Sourcepub const unsafe fn from_raw(v: u32) -> Self
pub const unsafe fn from_raw(v: u32) -> Self
Constructs a new object by wrapping the given integer value.
§Safety
Be sure the given value is meaningful for the actual type.
Sourcepub const fn raw(&self) -> u32
pub const fn raw(&self) -> u32
Returns the primitive integer underlying value.
This method is similar to Into
, but it
is const
, therefore it can be used in
const contexts.
Source§impl DISPOSITION
impl DISPOSITION
Sourcepub const CREATE_NEW: Self
pub const CREATE_NEW: Self
Creates a new file only if it does not already exist.
If the specified file exists the function fails and the last-error code
is set to ERROR::FILE_EXISTS
.
If the specified file does not exist and is a valid path to a writable location a new file is created.
Sourcepub const CREATE_ALWAYS: Self
pub const CREATE_ALWAYS: Self
Creates a new file always.
If the specified file exists and is writable the function overwrites
the file the function succeeds and last-error code is set to
ERROR::ALREADY_EXISTS
.
If the specified file does not exist and is a valid path a new file is
created the function succeeds and the last-error code is set to
ERROR::SUCCESS
.
Sourcepub const OPEN_EXISTING: Self
pub const OPEN_EXISTING: Self
Opens a file or device only if it exists.
If the specified file or device does not exist the function fails and
the last-error code is set to
ERROR::FILE_NOT_FOUND
.
Sourcepub const OPEN_ALWAYS: Self
pub const OPEN_ALWAYS: Self
Opens a file always.
If the specified file exists the function succeeds and the last-error
code is set to
ERROR::ALREADY_EXISTS
.
If the specified file does not exist and is a valid path to a writable
location the function creates a file and the last-error code is set to
ERROR::SUCCESS
.
Sourcepub const TRUNCATE_EXISTING: Self
pub const TRUNCATE_EXISTING: Self
Opens a file and truncates it so that its size is zero bytes only if it exists.
If the specified file does not exist the function fails and the
last-error code is set to
ERROR::FILE_NOT_FOUND
.
The calling process must open the file with the
GENERIC::WRITE
bit set as part of the
dwDesiredAccess
parameter.
Trait Implementations§
Source§impl AsRef<u32> for DISPOSITION
impl AsRef<u32> for DISPOSITION
Source§impl Binary for DISPOSITION
impl Binary for DISPOSITION
Source§impl Clone for DISPOSITION
impl Clone for DISPOSITION
Source§fn clone(&self) -> DISPOSITION
fn clone(&self) -> DISPOSITION
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more