Skip to content

Instantly share code, notes, and snippets.

@Noxivs
Created August 3, 2014 19:57
Show Gist options
  • Save Noxivs/1aeea99fd75357823691 to your computer and use it in GitHub Desktop.
Save Noxivs/1aeea99fd75357823691 to your computer and use it in GitHub Desktop.
#[handler="3"]
pub fn handle_hello_connect(client: Client, cx: Context, msg: ClientMessage) {
/* ... */
}
#[deriving(Clone)]
pub type Handler = fn(client: Client, cx: Context, msg: ClientMessage) -> ();
fn main () {
let handlers: &[(Handler, int)] = handlers!();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment