Override a trait for external struct with a out of scope method

can someone help me?? i wanna override a trait for external struct with a method but i got an error because my method is undefined for scope of trait!!!

qu|584x385

my question is how to call init function in scope of trait to obtain b and i can call method
on b? i tried static for b but because a isn't constant i got an error.

This sounds like an XY problem - what are you actually trying to do here? I also don't really see the relationship between my_trait, external_struct, A and my_struct in your code example, there's apparently nothing connecting them.

1 Like