Function interoptopus::util::is_global_type
source · pub fn is_global_type(t: &CType) -> bool
Expand description
Checks whether the given type should be “the same type everywhere”.
In complex setups we sometimes want to use types between two (otherwise unrelated) bindings.
For example, we would like to produce a FFISlice<u8>
in library A, and consume that in
library B. On the other hand, a FFISlice<MyStruct>
is not something everyone should know of.
For our bindings to know whether some types should go to a shared namespace this function will inform them whether the underlying type should be shared.