smoltcp icon indicating copy to clipboard operation
smoltcp copied to clipboard

Ergonomics of `Interface::new` device parameter

Open TomCrypto opened this issue 9 months ago • 4 comments

Currently the Interface struct needs a Device to construct itself via Interface::new, but all it does with it is call capabilities on it. In some cases (e.g. embedded code) we would like to instantiate the Interface before the device object can be constructed, even though we typically know the device capabilities upfront.

Should Interface::new directly take a DeviceCapabilities parameter instead of a Device?

TomCrypto avatar May 13 '24 12:05 TomCrypto