use endpoint_sec_sys::{es_event_remount_t, statfs};
#[cfg(feature = "macos_15_0_0")]
use endpoint_sec_sys::es_mount_disposition_t;
#[doc(alias = "es_event_remount_t")]
#[cfg_attr(not(feature = "macos_15_0_0"), allow(dead_code))]
pub struct EventRemount<'a> {
pub(crate) raw: &'a es_event_remount_t,
pub(crate) version: u32,
}
impl<'a> EventRemount<'a> {
#[inline(always)]
pub fn statfs(&self) -> &'a statfs {
unsafe { self.raw.statfs() }
}
#[inline(always)]
#[cfg(feature = "macos_15_0_0")]
pub fn remount_flags(&self) -> Option<u64> {
(self.version >= 8).then_some(self.raw.remount_flags)
}
#[inline(always)]
#[cfg(feature = "macos_15_0_0")]
pub fn disposition(&self) -> Option<es_mount_disposition_t> {
(self.version >= 8).then_some(self.raw.disposition)
}
}
unsafe impl Send for EventRemount<'_> {}
unsafe impl Sync for EventRemount<'_> {}
impl_debug_eq_hash_with_functions!(EventRemount<'a>;
statfs,
#[cfg(feature = "macos_15_0_0")] remount_flags,
#[cfg(feature = "macos_15_0_0")] disposition
);