use giterated_models::error::OperationError; use crate::{future::RuntimeFuture, new_stack::PluginState, AnyFailure, AnySuccess, FFIBox}; #[derive(Clone, Copy)] pub struct RuntimeVTable { pub(crate) runtime: PluginState, pub(crate) handle_fn: unsafe extern "C" fn( PluginState, FFIBox, FFIBox, FFIBox, FFIBox<[u8]>, FFIBox<[u8]>, ) -> RuntimeFuture< Result>, >, } pub trait IntoRuntimeVtable { unsafe extern "C" fn handle( this: PluginState, object_kind: FFIBox, operation_name: FFIBox, object: FFIBox, operation_payload: FFIBox<[u8]>, operation_state: FFIBox<[u8]>, ) -> RuntimeFuture>>; }