bitflags::bitflags! {
pub struct Flags: libc::c_ulong {
#[cfg(not(target_os = "macos"))]
const MANDLOCK = libc::ST_MANDLOCK;
#[cfg(not(target_os = "macos"))]
const NOATIME = libc::ST_NOATIME;
#[cfg(not(target_os = "macos"))]
const NODEV = libc::ST_NODEV;
#[cfg(not(target_os = "macos"))]
const NODIRATIME = libc::ST_NODIRATIME;
#[cfg(not(target_os = "macos"))]
const NOEXEC = libc::ST_NOEXEC;
const NOSUID = libc::ST_NOSUID;
const RDONLY = libc::ST_RDONLY;
#[cfg(not(any(target_os = "macos", target_env = "musl")))]
const RELATIME = libc::ST_RELATIME;
#[cfg(not(target_os = "macos"))]
const SYNCHRONOUS = libc::ST_SYNCHRONOUS;
}
}
pub trait UsageExt {
fn flags(&self) -> Flags;
}
#[cfg(unix)]
impl UsageExt for crate::Usage {
fn flags(&self) -> Flags {
self.as_ref().flags()
}
}