summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/rand/types.rs
blob: e12bd9cbd0c4ca187f0c8542c6b1038524b1bfa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[cfg(any(target_os = "android", target_os = "linux"))]
use super::super::c;
#[cfg(any(target_os = "android", target_os = "linux"))]
use bitflags::bitflags;

#[cfg(any(target_os = "android", target_os = "linux"))]
bitflags! {
    /// `GRND_*` flags for use with [`getrandom`].
    ///
    /// [`getrandom`]: crate::rand::getrandom
    pub struct GetRandomFlags: u32 {
        /// `GRND_RANDOM`
        const RANDOM = c::GRND_RANDOM;
        /// `GRND_NONBLOCK`
        const NONBLOCK = c::GRND_NONBLOCK;
        /// `GRND_INSECURE`
        const INSECURE = c::GRND_INSECURE;
    }
}