dope-sys 0.25.0

Typed operating-system call contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// One creation mode for `open(2)`.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(transparent)]
pub struct Mode(libc::mode_t);

impl Mode {
    pub const fn new(bits: u32) -> Self {
        Self(bits as libc::mode_t)
    }

    pub const fn raw(self) -> libc::mode_t {
        self.0
    }
}