rustix/backend/libc/shm/
types.rs

1use crate::backend::c;
2use bitflags::bitflags;
3
4bitflags! {
5    /// `O_*` constants for use with [`shm::open`].
6    ///
7    /// [`shm::open`]: crate:shm::open
8    #[repr(transparent)]
9    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
10    pub struct ShmOFlags: u32 {
11        /// `O_CREAT`
12        #[doc(alias = "CREAT")]
13        const CREATE = bitcast!(c::O_CREAT);
14
15        /// `O_EXCL`
16        const EXCL = bitcast!(c::O_EXCL);
17
18        /// `O_RDONLY`
19        const RDONLY = bitcast!(c::O_RDONLY);
20
21        /// `O_RDWR`
22        const RDWR = bitcast!(c::O_RDWR);
23
24        /// `O_TRUNC`
25        const TRUNC = bitcast!(c::O_TRUNC);
26
27        /// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
28        const _ = !0;
29    }
30}