use std::ffi::OsStr;
use endpoint_sec_sys::{es_event_login_logout_t, uid_t};
#[doc(alias = "es_event_login_logout_t")]
pub struct EventLoginLogout<'a> {
pub(crate) raw: &'a es_event_login_logout_t,
}
impl<'a> EventLoginLogout<'a> {
#[inline(always)]
pub fn username(&self) -> &'a OsStr {
unsafe { self.raw.username.as_os_str() }
}
#[inline(always)]
pub fn uid(&self) -> uid_t {
self.raw.uid
}
}
unsafe impl Send for EventLoginLogout<'_> {}
impl_debug_eq_hash_with_functions!(EventLoginLogout<'a>; username, uid);