Unless I'm missing something, I think you can clean it up and keep your static dispatch by turning the Driver struct into a trait:
You'd rename your struct Driver to struct DriverImpl, define a trait Driver and for the implementation you'd use impl Driver for DriverImpl where etc...
1 Comments
ActuallyRuben@actuallyruben.nl · 1 pts · 3y
Unless I'm missing something, I think you can clean it up and keep your static dispatch by turning the Driver struct into a trait:
You'd rename your
struct Drivertostruct DriverImpl, define atrait Driverand for the implementation you'd useimpl Driver for DriverImpl where etc...