Fixes for FFI.
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing

This commit is contained in:
2022-10-01 15:40:15 +02:00
parent 78fde698ca
commit 84ddf0307d
15 changed files with 457 additions and 111 deletions

View File

@@ -33,6 +33,11 @@ pub trait DataLibrary<'a, T: 'a> {
self.map().get::<u32>(&key)
}
/// Gets a value from the library by the index where it is stored.
fn get_key_by_index(&'a self, index: usize) -> Option<&StringKey> {
self.map().get_index(index).map(|a| a.0)
}
/// Gets the amount of values in the library.
fn len(&self) -> usize {
self.map().len()