Moving definitions depending on sixtyfps to other file behaves weird #778
-
I've extracted some helper struct to other rs file and get error like " error[E0271]: type mismatch resolving So is it possible to move some sixtyfps stuff to other rs files? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If i understand you correctly your goal is to get the struct data declared in sixtyfps in your rust code, potential modify it and set it back? Because the sixtyfps model trait is implemented multiple times depending on the trait bounds you have to understand how you try to access the model data. To have a look at all the implementations have a look at the model source file
hope that helps |
Beta Was this translation helpful? Give feedback.
-
@Vollbrecht , Hi. I guess best way to explain is to show code: When I cut and paste my code from id_map_data.rs to main.rs it works. I assume it is because types declared in different files are somehow considered/generated as different. |
Beta Was this translation helpful? Give feedback.
@Vollbrecht , Hi. I guess best way to explain is to show code:
extract-to-module-not-working-for-me.zip
When I cut and paste my code from id_map_data.rs to main.rs it works.
when-it-works.zip
I assume it is because types declared in different files are somehow considered/generated as different.
Maybe, I use macro
sixtyfps::include_modules!();
wrong?