rustix/backend/linux_raw/shm/
types.rs

1use crate::ffi;
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: ffi::c_uint {
11        /// `O_CREAT`
12        #[doc(alias = "CREAT")]
13        const CREATE = linux_raw_sys::general::O_CREAT;
14
15        /// `O_EXCL`
16        const EXCL = linux_raw_sys::general::O_EXCL;
17
18        /// `O_RDONLY`
19        const RDONLY = linux_raw_sys::general::O_RDONLY;
20
21        /// `O_RDWR`
22        const RDWR = linux_raw_sys::general::O_RDWR;
23
24        /// `O_TRUNC`
25        const TRUNC = linux_raw_sys::general::O_TRUNC;
26
27        /// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
28        const _ = !0;
29    }
30}