ffi_rpc 0.6.0

Use FFI with RPC.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use abi_stable::{
    std_types::{RHashMap, RString},
    StableAbi,
};

use crate::plugin::PluginApiRef;

#[repr(C)]
#[derive(StableAbi, Default, Clone)]
pub struct Registry {
    pub item: RHashMap<RString, PluginApiRef>,
}

impl Registry {
    pub fn get(&self, id: &str) -> Option<PluginApiRef> {
        self.item.get(id).cloned()
    }
}