use std::fmt::Debug; use std::sync::Arc; use giterated_models::{ error::OperationError, object::{GiteratedObject, Object, ObjectRequestError}, object_backend::ObjectBackend, operation::GiteratedOperation, }; use crate::vtable::{AnyFailure, AnySuccess, OperationVTable}; use super::{handle::RuntimeHandle, PluginState}; #[repr(C)] struct RuntimeHandleInner { state: PluginState, handle_serialized: unsafe extern "C" fn( object_kind: &str, operation_name: &str, object: &str, operation_payload: &[u8], ) -> HandlerResult, } unsafe impl Send for RuntimeHandleInner {} unsafe impl Sync for RuntimeHandleInner {} #[repr(C)] struct HandlerResult { operation_vtable: OperationVTable, result: Result>, }