use std::ffi::OsStr;
use endpoint_sec_sys::es_event_lookup_t;
use crate::File;
#[doc(alias = "es_event_lookup_t")]
pub struct EventLookup<'a> {
pub(crate) raw: &'a es_event_lookup_t,
}
impl<'a> EventLookup<'a> {
#[inline(always)]
pub fn source_dir(&self) -> File<'a> {
File::new(unsafe { self.raw.source_dir() })
}
#[inline(always)]
pub fn relative_target(&self) -> &'a OsStr {
unsafe { self.raw.relative_target.as_os_str() }
}
}
unsafe impl Send for EventLookup<'_> {}
impl_debug_eq_hash_with_functions!(EventLookup<'a>; source_dir, relative_target);