The NetMsg trait is not strictly required; Any can be used instead. Getting rid of this trait should solve a potential issue with Rust's orphan rule and networking a foreign type. If you want to network a foreign type, you would need to use the newtype pattern.
This PR removes the NetMsg trait in favor of Any + Send + Sync, solving the need for this newtype.
The
NetMsg
trait is not strictly required;Any
can be used instead. Getting rid of this trait should solve a potential issue with Rust's orphan rule and networking a foreign type. If you want to network a foreign type, you would need to use the newtype pattern. This PR removes theNetMsg
trait in favor ofAny + Send + Sync
, solving the need for this newtype.