Hi,

The thread below illustrates a use case where a third party Device structure can have borrowed data with its own lifetimes. And this makes it impossible to implement the Device trait for such a structure. Also it need not be a reference to the packet itself as mentioned in the thread below, basically a third party device structure cannot have any kind of references :(

https://users.rust-lang.org/t/implementing-a-trait-for-all-lifetimes-of-the-struct/45045

I cant see why the Device trait is mentioned as "for all lifetimes", can anything be done to support this pls ?

Rgds, Gopa.

0

Just to add that if it sounds ok to have the device not be over all lifetimes, I can take a crack at making the required changes and send it across

0

I see that @Dirbaio has tried to address this in https://github.com/smoltcp-rs/smoltcp/pull/572 ! That's awesome, I hope that gets in once GAT is available?

0
© 2022 pullanswer.com - All rights reserved.