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
I was thinking of splitting the implementations of Interface, InterfaceBuilder and InterfaceInner into multiple files, where each file implements for a specific medium. I was working on the IEEE802.15.4 and 6LoWPAN protocol and I found that the src/iface/interface.rs was getting big with things that where sometimes unrelated. What do you think about this change?
But then again, I'm not sure if this is the best way to go as well, since, for example, lookup_hardware_addr is needed for Ethernet and IEEE802.15.4.
The text was updated successfully, but these errors were encountered:
I did an attempt at splitting multiple mediums in multiple structs in #336 and it went really badly. Interface is really complex and Ethernet/IP aren't really independent of each other, so you can't simply split them like that. It was an uphill battle against the borrow checker :)
What might work is splitting them in multiple files, but still being impls on the same Interface struct. It's a mostly "cosmetic" improvement though, everything is still a megastruct, but it could still be worth it.
What might work is splitting them in multiple files, but still being impls on the same Interface struct. It's a mostly "cosmetic" improvement though, everything is still a megastruct, but it could still be worth it.
I tried doing that as well and agree that it's very "cosmetic" and even worse than everything in one file. I'll close this issue then.
I was thinking of splitting the implementations of
Interface
,InterfaceBuilder
andInterfaceInner
into multiple files, where each file implements for a specific medium. I was working on the IEEE802.15.4 and 6LoWPAN protocol and I found that thesrc/iface/interface.rs
was getting big with things that where sometimes unrelated. What do you think about this change?But then again, I'm not sure if this is the best way to go as well, since, for example,
lookup_hardware_addr
is needed for Ethernet and IEEE802.15.4.The text was updated successfully, but these errors were encountered: