Rework of FFI, adding a value identifier, so we can keep knowledge of data even when data moves.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-10-08 13:15:04 +02:00
parent 84ddf0307d
commit 41b40ef98e
38 changed files with 582 additions and 230 deletions

View File

@@ -14,8 +14,8 @@ pub trait DataLibrary<'a, T: 'a> {
fn get_modify(&mut self) -> &mut IndexMap<StringKey, Arc<T>>;
/// Adds a new value to the library.
fn add(&mut self, key: &StringKey, value: T) {
self.get_modify().insert(key.clone(), Arc::new(value));
fn add(&mut self, key: &StringKey, value: Arc<T>) {
self.get_modify().insert(key.clone(), value);
}
/// Removes a value from the library.