Open milyin opened 3 weeks ago
I think the behavior as is is correct and does not need any change, if needed you can always search for something like "owned(z_owned_bytes_t".
I think the behavior as is is correct and does not need any change, if needed you can always search for something like "owned(z_owned_bytes_t".
It's correct but not convenient. When I go to type definition, I want to know how to use this type. The opaque type is completely blind and doesn't give any hints where to find additional information. So this is additional obstacle for ones who want to understand how the API works
Describe the feature
Working on zenoh-c it's frequently necessary to know how rust and c-wrapper types are related. For example:
z_owned_bytes_t
in the codeThis may be disappointing to anyone who is trying to understand how zenoh-c works. This will slowdown our own performance, making learning curve for zenoh-c internals too steep for new developers and especially for ones who occasionally need to fix something.
The proposal is to declare some internal types in opaque_types instead of the final ones. And declare real API types
z_owned_bytes_t
,z_loaned_bytes_t
, etc. insidedecl_c_type!
macro. In this case "go to definition" will go directly to this macro call with all necessary information