Skip to content

Instantly share code, notes, and snippets.

@nemosupremo
Created September 12, 2018 02:58
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 nemosupremo/fc45bd25a7353b2c210bbce270be816b to your computer and use it in GitHub Desktop.
Save nemosupremo/fc45bd25a7353b2c210bbce270be816b to your computer and use it in GitHub Desktop.
pub enum Command {
Unimplemented(super::Unimplemented),
Get(string::Get),
Set(string::Set),
Append(string::Append),
Ping(connection::Ping),
Echo(connection::Echo),
}
impl Command {
pub fn to_cmd(&self) -> &(Cmd + Send + Sync) {
match self {
Command::Get(s) => s,
Command::Set(s) => s,
_ => panic!("todo")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment