Struct winsafe::co::DISPOSITION
source · 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 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 moresource§impl Debug for DISPOSITION
impl Debug for DISPOSITION
source§impl Default for DISPOSITION
impl Default for DISPOSITION
source§fn default() -> DISPOSITION
fn default() -> DISPOSITION
source§impl Display for DISPOSITION
impl Display for DISPOSITION
source§impl From<DISPOSITION> for u32
impl From<DISPOSITION> for u32
source§fn from(v: DISPOSITION) -> Self
fn from(v: DISPOSITION) -> Self
source§impl Hash for DISPOSITION
impl Hash for DISPOSITION
source§impl IntUnderlying for DISPOSITION
impl IntUnderlying for DISPOSITION
source§impl LowerHex for DISPOSITION
impl LowerHex for DISPOSITION
source§impl Octal for DISPOSITION
impl Octal for DISPOSITION
source§impl Ord for DISPOSITION
impl Ord for DISPOSITION
source§impl PartialEq for DISPOSITION
impl PartialEq for DISPOSITION
source§fn eq(&self, other: &DISPOSITION) -> bool
fn eq(&self, other: &DISPOSITION) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DISPOSITION
impl PartialOrd for DISPOSITION
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more