When using russimp in a project, it is not possible to read the metadata that is parsed from the loaded file.
Specifically, the following unit-test code from metadata.rs line 254 metadata_for_box() function does not compile when it is used in a separate (non-test) module:
assert_eq!(
metadata.values[0].0.as_ref().unwrap(),
&MetadataType::String("Blender 3D Importer (http://www.blender3d.org)".to_string())
);
The compiler shows this error:
field `0` of `MetaDataEntry` is private
This code works in the test case, as by default private fields are accessible to nested test module code, however it is not accessible to external code. This makes it impossible for client code to parse metadata contents.
When using
russimp
in a project, it is not possible to read the metadata that is parsed from the loaded file.Specifically, the following unit-test code from
metadata.rs
line 254metadata_for_box()
function does not compile when it is used in a separate (non-test) module:The compiler shows this error:
This code works in the test case, as by default private fields are accessible to nested test module code, however it is not accessible to external code. This makes it impossible for client code to parse metadata contents.
The fix for this is very simple: https://github.com/jkvargas/russimp/pull/57