Struct WIN32_ERROR
#[repr(transparent)]pub struct WIN32_ERROR(pub u32);Expand description
An error or status code value returned by some operating system functions.
Tuple Fields§
§0: u32Implementations§
Source§impl WIN32_ERROR
impl WIN32_ERROR
Sourcepub const fn to_hresult(self) -> HRESULT
pub const fn to_hresult(self) -> HRESULT
Maps a Win32 error code to an HRESULT value.
Sourcepub fn from_error(error: &Error) -> Option<WIN32_ERROR>
pub fn from_error(error: &Error) -> Option<WIN32_ERROR>
Returns the Win32 error contained in error, if it represents one.
Sourcepub fn ok(self) -> Result<(), Error>
pub fn ok(self) -> Result<(), Error>
Converts the error to a Result, treating a successful code as Ok.
Sourcepub fn from_thread() -> WIN32_ERROR
pub fn from_thread() -> WIN32_ERROR
Creates a new WIN32_ERROR from the Win32 error code returned by GetLastError().
Trait Implementations§
Source§impl Clone for WIN32_ERROR
impl Clone for WIN32_ERROR
Source§fn clone(&self) -> WIN32_ERROR
fn clone(&self) -> WIN32_ERROR
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 WIN32_ERROR
Source§impl Debug for WIN32_ERROR
impl Debug for WIN32_ERROR
Source§impl Default for WIN32_ERROR
impl Default for WIN32_ERROR
Source§fn default() -> WIN32_ERROR
fn default() -> WIN32_ERROR
Returns the “default value” for a type. Read more
Source§impl Display for WIN32_ERROR
impl Display for WIN32_ERROR
impl Eq for WIN32_ERROR
Source§impl From<WIN32_ERROR> for HRESULT
impl From<WIN32_ERROR> for HRESULT
Source§fn from(value: WIN32_ERROR) -> HRESULT
fn from(value: WIN32_ERROR) -> HRESULT
Converts to this type from the input type.
Source§impl From<WIN32_ERROR> for Error
impl From<WIN32_ERROR> for Error
Source§fn from(value: WIN32_ERROR) -> Error
fn from(value: WIN32_ERROR) -> Error
Converts to this type from the input type.
Source§impl Hash for WIN32_ERROR
impl Hash for WIN32_ERROR
Source§impl Ord for WIN32_ERROR
impl Ord for WIN32_ERROR
Source§fn cmp(&self, other: &WIN32_ERROR) -> Ordering
fn cmp(&self, other: &WIN32_ERROR) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for WIN32_ERROR
impl PartialEq for WIN32_ERROR
Source§impl PartialOrd for WIN32_ERROR
impl PartialOrd for WIN32_ERROR
impl StructuralPartialEq for WIN32_ERROR
Auto Trait Implementations§
impl Freeze for WIN32_ERROR
impl RefUnwindSafe for WIN32_ERROR
impl Send for WIN32_ERROR
impl Sync for WIN32_ERROR
impl Unpin for WIN32_ERROR
impl UnsafeUnpin for WIN32_ERROR
impl UnwindSafe for WIN32_ERROR
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