In general case, it is not possible to implement in crate C1 a trait defined in C2 for a Type defined in crate C3, being assumed that C1, C2, C3 are different
But is there a trick to designing a trait on purpose, so that such implementations are allowed?
Since Rust 1.41, it seems that Rust’s orphan rules have been a little bit more relaxed, as explained in Into doc.
The key is to make the trait dependent on a type parameter which is defined in the implementing crate. For example, the following, crate workspace "orphan", will actually work:
with result:
In conclusion, there is a trick to design a trait in crate c1, so there is a way in some sense to implement this trait in crate c3 for a type defined in crate c2, assuming c1 , c2, c3 are different!