MitchellMarinoDev / carrier-pigeon

A rusty networking library for games.
Other
13 stars 2 forks source link

Remove NetMsg trait. #1

Closed MitchellMarinoDev closed 2 years ago

MitchellMarinoDev commented 2 years ago

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.