Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created August 25, 2019 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/717dbd9bb1e2492ea3d7b57971487f69 to your computer and use it in GitHub Desktop.
Save rust-play/717dbd9bb1e2492ea3d7b57971487f69 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
trait ActorMessage {
fn f();
}
struct Message;
impl<T: 'static + ActorMessage> From<T> for Message {
fn from(_: T) -> Message {
Message
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment