use endpoint_sec_sys::es_event_remote_thread_create_t;
use crate::{Process, ThreadState};
#[doc(alias = "es_event_remote_thread_create_t")]
pub struct EventRemoteThreadCreate<'a> {
pub(crate) raw: &'a es_event_remote_thread_create_t,
pub(crate) version: u32,
}
impl<'a> EventRemoteThreadCreate<'a> {
#[inline(always)]
pub fn target(&self) -> Process<'a> {
Process::new(unsafe { self.raw.target() }, self.version)
}
#[inline(always)]
pub fn thread_state(&self) -> Option<ThreadState<'a>> {
unsafe { self.raw.thread_state() }.map(ThreadState::new)
}
}
unsafe impl Send for EventRemoteThreadCreate<'_> {}
impl_debug_eq_hash_with_functions!(EventRemoteThreadCreate<'a> with version; target, thread_state);