dope-core 0.10.1

The manifold runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::io::Error;

#[derive(Clone, Copy)]
pub(super) struct Errno(i32);

impl Errno {
    pub(super) fn last() -> Self {
        Self(Error::last_os_error().raw_os_error().unwrap_or(0))
    }

    pub(super) const fn raw(self) -> i32 {
        self.0
    }

    pub(super) const fn is_block(self) -> bool {
        self.0 == libc::EAGAIN || self.0 == libc::EWOULDBLOCK
    }
}