Issues with generics
⚓ Rust 📅 2025-10-30 👤 surdeus 👁️ 6i have a situation along the line of
impl<A> Trait1 for A{
fn myfunc(&mut self){
.................
<A as Trait2>::fn(self) //if and only if A:Trait2
.................
}
}
i think i can probably find a workaround to do that but i was wondering if anyone knows of a clean maintainable solution for something like this ideally without runtime costs
5 posts - 3 participants
🏷️ Rust_feed