use crate::{ callback::{ operation::OperationHandlerCallback, setting::SettingGetterCallback, value::ValueGetterCallback, CallbackPtr, }, FfiValueMut, }; use super::{operation::Operation, Object, ObjectABI, Setting, VTable, Value}; #[repr(C)] pub struct HostVTable {} #[repr(C)] #[derive(Clone, Copy)] pub struct InitializationVTable { pub register_object: unsafe extern "C" fn(state: FfiValueMut<()>, &'static str, &'static VTable), pub register_operation: unsafe extern "C" fn( state: FfiValueMut<()>, &'static str, &'static str, &'static VTable, ), pub register_setting: unsafe extern "C" fn( state: FfiValueMut<()>, &'static str, &'static str, &'static VTable, ), pub register_value: unsafe extern "C" fn( state: FfiValueMut<()>, &'static str, &'static str, &'static VTable, ), pub operation_handler: unsafe extern "C" fn( state: FfiValueMut<()>, &'static str, &'static str, CallbackPtr, ), pub value_getter: unsafe extern "C" fn( state: FfiValueMut<()>, &'static str, &'static str, CallbackPtr, ), pub setting_getter: unsafe extern "C" fn( state: FfiValueMut<()>, &'static str, &'static str, CallbackPtr, ), } impl ObjectABI for InitializationVTable { type VTable = InitializationVTable; } unsafe impl Sync for InitializationVTable {} unsafe impl Send for InitializationVTable {}