Fixes for FFI.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user