#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub struct NativeDispatch {
pub function_count: u32,
pub functions: *const *const (),
}
unsafe impl Send for NativeDispatch {}
unsafe impl Sync for NativeDispatch {}
#[cfg(test)]
mod tests {
use core::mem::{align_of, offset_of, size_of};
use crate::dispatch::native_dispatch::NativeDispatch;
#[test]
fn layout_native_dispatch() {
assert_eq!(size_of::<NativeDispatch>(), 16);
assert_eq!(align_of::<NativeDispatch>(), 8);
assert_eq!(offset_of!(NativeDispatch, function_count), 0);
assert_eq!(offset_of!(NativeDispatch, functions), 8);
}
}