use giterated_models::error::OperationError; use crate::vtable::{AnyFailure, AnySuccess, OperationVTable}; pub struct RuntimeHandle { inner: RuntimeHandleInner, } impl RuntimeHandle { pub async fn handle_serialized( &self, operation_name: &str, object: &str, operation: &[u8], ) -> Result, OperationError>> { todo!() } } #[repr(C)] struct RuntimeHandleInner { handle_serialized: unsafe extern "C" fn( object_kind: &str, operation_name: &str, object: &str, operation_payload: &[u8], ) -> HandlerResult, } #[repr(C)] struct HandlerResult { operation_vtable: OperationVTable, result: Result>, }