If by external, you mean a struct defined in a different crate, then I believe the answer is no (please someone correct me if there is something I’m not aware of). There is an in-development run-time reflection API, rust-reflect. That being said, using run-time reflection to accomplish this goal, though imposing run-time overhead, might be the way to go for some of these kinds of things, but, it seems like a poor solution to the problem as well.
Perhaps, if there were a compile-time reflection API for structs that could be leveraged by procedure and/or rule-based macros, then many of these problems mentioned could be solved relatively painlessly. For example, if the answer is “New Type” wrapping to most of these problems, but, that is deemed too inconvenient/difficult to manage, then, could compile-time reflection coupled with appropriate macros provide the needed simplicity?
For example, in the Serde “Remote Derive” case, if Serde could define a macro that utilized compile-time reflection to create new-type wrapped remote- serde implementations for any 3rd party struct, would that resolve that case? Would other cases be amendable to a similar solution? NOTE: When I say “Compile-Time Reflection” I mean that there would be an annotation that could be placed on a struct (in the crate that defines the struct) that would cause compile-time reflection information to be generated and stored in the compiled lib. Then, macros, could have an API to access the stored compile-time reflection information about any struct. So, you could do something like
use SomeCrate::SomeModule::SomeStructThatHasReflection;
[#serde-remote-reflect]
type MySomeStructThatHasReflection : SomeTypeThatHasReflection;
To get a full “New Type” wrapped Serde Remote implementation for SomeTypeThatHasReflection provide it was annotated with the compile-time reflection annotation and that it met the rules that Serde would demand for auto-derive, like say, the struct must have no private members.
Maybe something like this, Reflect should be explored with respect to this problem space.