Struct winresult_types::WaitCode
source · [−]#[repr(transparent)]pub struct WaitCode(_);Expand description
[docs.microsoft.com] WAIT_* values returned by various WaitFor* and other win32 functions.
Implementations
sourceimpl WaitCode
impl WaitCode
pub const fn to_u32(self) -> u32
sourcepub fn to_object<T: From<u8>>(self) -> Option<T>
pub fn to_object<T: From<u8>>(self) -> Option<T>
Returns
Some(0)forWAIT::OBJECT_0Some(63)forWAIT::OBJECT_0 + 63NoneforWAIT::OBJECT_0 + 64(>=MAXIMUM_WAIT_OBJECTS)
sourcepub fn to_abandoned<T: From<u8>>(self) -> Option<T>
pub fn to_abandoned<T: From<u8>>(self) -> Option<T>
Returns
Some(0)forWAIT::ABANDONED_0Some(63)forWAIT::ABANDONED_0 + 63NoneforWAIT::ABANDONED_0 + 64(>=MAXIMUM_WAIT_OBJECTS)
pub fn to_object_u32(self) -> Option<u32>
pub fn to_object_usize(self) -> Option<usize>
pub fn to_abandoned_u32(self) -> Option<u32>
pub fn to_abandoned_usize(self) -> Option<usize>
Trait Implementations
sourceimpl Ord for WaitCode
impl Ord for WaitCode
sourceimpl PartialOrd<WaitCode> for WaitCode
impl PartialOrd<WaitCode> for WaitCode
sourcefn partial_cmp(&self, other: &WaitCode) -> Option<Ordering>
fn partial_cmp(&self, other: &WaitCode) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for WaitCode
impl Eq for WaitCode
impl StructuralEq for WaitCode
impl StructuralPartialEq for WaitCode
Auto Trait Implementations
impl RefUnwindSafe for WaitCode
impl Send for WaitCode
impl Sync for WaitCode
impl Unpin for WaitCode
impl UnwindSafe for WaitCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more