this post was submitted on 01 Feb 2026
17 points (94.7% liked)

Rust Programming

9122 readers
6 users here now

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments

@Ephera that feels wrong, somehow ...

You can have the thing you are dereferencing to be a trait, so you can change your "base class" at runtime.

At least, you can't have multiple inheritance with impl Deref (I hope / as far as I can see)