2 points

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...

permalink
report
reply

Rust

!rust@programming.dev

Create post

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

Community stats

  • 622

    Monthly active users

  • 851

    Posts

  • 3.4K

    Comments