JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Before

Amber - ⁨1⁩ year ago

parent: tbd commit: ⁨e432306

⁨giterated-plugin/src/new_stack/runtime_handler.rs⁩ - ⁨652⁩ bytes
Raw
1 use giterated_abi::{
2 value_ex::FfiValueUntyped,
3 vtable::{operation::Operation, VTable},
4 };
5 use giterated_models::error::OperationError;
6
7 use super::PluginState;
8
9 #[repr(C)]
10 struct RuntimeHandleInner {
11 state: PluginState,
12 handle_serialized: unsafe extern "C" fn(
13 object_kind: &str,
14 operation_name: &str,
15 object: &str,
16 operation_payload: &[u8],
17 ) -> HandlerResult,
18 }
19
20 unsafe impl Send for RuntimeHandleInner {}
21 unsafe impl Sync for RuntimeHandleInner {}
22
23 #[repr(C)]
24 struct HandlerResult {
25 operation_vtable: VTable<Operation>,
26 result: Result<FfiValueUntyped, OperationError<FfiValueUntyped>>,
27 }
28