You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessing multiple extension types: you would have to declare all things you want to access at the same time otherwise you would have borrow checking issues.
If multiple instances of extensions can be accessed, we need to forbid accessing the same extension type twice. I believe this would have to be done at compile time to make sense to do. Foe example you would need to forbid (&mut T, &T) and (&mut T, &mut T). (&T, &T) would technically be valid under borrowing rules but it is definitely not optimal.
I was looking at something similar to match_out_struct/match_in_struct, but it returns a tuple of
Option
values if some type of structure was found.The idea is largely inspired by the
vk_find_struct(_const)
macros in Mesa.I'd think the macro could look like this:
Although there are a few questions worth asking:
(&mut T, &T)
and(&mut T, &mut T)
.(&T, &T)
would technically be valid under borrowing rules but it is definitely not optimal.The text was updated successfully, but these errors were encountered: