pub struct Win32Error(/* private fields */);Expand description
A raw Win32 error code, kept in the currency it arrived in.
Every failing API this crate calls is a classic last-error API, so a code is
always a WIN32_ERROR rather than an HRESULT. Keeping the raw value beside
the crate’s own classification means a caller can act on either.
Implementations§
Source§impl Win32Error
impl Win32Error
Sourcepub fn from_io(error: &Error) -> Self
pub fn from_io(error: &Error) -> Self
Take the code from an OS error, or 0 if it carries none.
A last-error API always sets one, so 0 covers only a fabricated
io::Error with no OS error behind it.
Sourcepub fn to_io_error(self) -> Error
pub fn to_io_error(self) -> Error
The same failure as a standard io::Error, for callers that funnel
everything through std::io.
Trait Implementations§
Source§impl Clone for Win32Error
impl Clone for Win32Error
Source§fn clone(&self) -> Win32Error
fn clone(&self) -> Win32Error
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 Win32Error
Source§impl Debug for Win32Error
impl Debug for Win32Error
Source§impl Display for Win32Error
impl Display for Win32Error
impl Eq for Win32Error
Source§impl Hash for Win32Error
impl Hash for Win32Error
Source§impl PartialEq for Win32Error
impl PartialEq for Win32Error
impl StructuralPartialEq for Win32Error
Auto Trait Implementations§
impl Freeze for Win32Error
impl RefUnwindSafe for Win32Error
impl Send for Win32Error
impl Sync for Win32Error
impl Unpin for Win32Error
impl UnsafeUnpin for Win32Error
impl UnwindSafe for Win32Error
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