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

ambee/giterated

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

More restructuring

Amber - ⁨1⁩ year ago

parent: tbd commit: ⁨10b7b7c

⁨giterated-runtime/giterated-abi/src/vtable/plugin.rs⁩ - ⁨580⁩ bytes
Raw
1 use crate::{value_ex::FfiValueRefUntyped, FfiSliceRef, FfiValueRef};
2
3 use super::ObjectABI;
4
5 pub struct Plugin {}
6
7 impl ObjectABI for Plugin {
8 type VTable = PluginVTable;
9 }
10
11 pub struct PluginVTable {
12 pub plugin_name: unsafe extern "C" fn() -> FfiSliceRef<str>,
13 pub plugin_version: unsafe extern "C" fn() -> FfiSliceRef<str>,
14 pub type_metadata: unsafe extern "C" fn() -> FfiValueRefUntyped,
15 }
16
17 impl PluginVTable {
18 pub fn plugin_name(&self) -> &'static str {
19 todo!()
20 }
21
22 pub fn type_metadata(&self) -> FfiValueRefUntyped {
23 todo!()
24 }
25 }
26