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
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
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>
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 moreimpl 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more