10 ms·
Hmm. Can you... impl From<T> for GeoBox ... outside the module/crate in which GeoBox is defined (as suggested at the end)?
by jdub 11y ago
Hmm. Can you...
impl From<T> for GeoBox
... outside the module/crate in which GeoBox is defined (as suggested at the end)?
- benashford 11y agoYes, as long as the implementation is in the same module/crate as the T. It's only where both the left and right-hand side are in external crates that would be a problem.
- jdub 11y agoEpic, thanks!
- untothebreach 11y agoYep, that is an advantage rust traits have over, say, java interfaces. (Though I hear java 8 is going to be able to do this as well)
- twic 11y agoJava 8 is out now and doesn't have this. I'm not aware of anything like this being on the cards for Java 9. Could you tell us more about what you heard?