Created
November 4, 2014 15:29
-
-
Save waterlink/6178e31276676b6e3412 to your computer and use it in GitHub Desktop.
Rust: Clone, Show, Send & friends
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Clone - for cloning non-owned resources to | |
// make actions that require ownership | |
// over them | |
// Show - if you ever want to log the value of | |
// this enum | |
// Send - if you ever want to send it over | |
// channel to a different task | |
// PartialEq - if you want to check if two instances | |
// of this enum are the same | |
#[deriving(Clone, Show, Send, PartialEq)] | |
enum Command < T: Clone + Show + Send + Message > { | |
Peek(Option < uint >), | |
PeekResult(Option < T >), | |
Push(T), | |
Clear, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment