use giterated_models::{ error::OperationError, object::{GiteratedObject, Object, ObjectRequestError}, object_backend::ObjectBackend, operation::GiteratedOperation, }; use std::fmt::Debug; use crate::vtable::RuntimeVTable; use super::OperationState; #[derive(Clone)] pub struct RuntimeHandle { runtime_vtable: RuntimeVTable, } impl RuntimeHandle { pub async fn handle_serialized( &self, _object: &str, _operation_name: &str, _payload: &[u8], ) -> Result, OperationError>> { todo!() } } impl RuntimeHandle { pub(crate) unsafe fn from_vtable(runtime_vtable: RuntimeVTable) -> Self { Self { runtime_vtable } } } #[async_trait::async_trait(?Send)] impl ObjectBackend for RuntimeHandle { async fn object_operation( &self, _object: O, _operation: &str, _payload: D, _operation_state: &OperationState, ) -> Result> where O: GiteratedObject + Debug + 'static, D: GiteratedOperation + Debug + 'static, D::Success: Clone, D::Failure: Clone, { todo!() } async fn get_object( &self, _object_str: &str, _operation_state: &OperationState, ) -> Result, OperationError> { todo!() } }