perf_monitor 0.2.1

A toolkit designed to be a foundation for applications to monitor their performance.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::num::NonZeroIsize;

/// Triage a return value of windows handle to `Some(handle)` or `None`
pub trait HandleUpgrade: Sized {
    fn upgrade(self) -> Option<NonZeroIsize>;
}

impl HandleUpgrade for isize {
    #[inline]
    fn upgrade(self) -> Option<NonZeroIsize> {
        NonZeroIsize::new(self)
    }
}