There is no right way to do inheritance in Rust.
That said, you can write code that does pretty much the same thing.
enum A {
B(B),
C(C),
}
struct B { ... }
struct C { ... }
impl A {
fn setup(&self) {
match self {
A::B(b) => { .... },
A::C(c) => { .... },
}
}
}