blob: 3863b4989d1a546ad9a0d11e8fc59c91de1f4e2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use std::borrow::{ Borrow, ToOwned };
use command;
use reply;
#[derive(Debug, Clone, PartialEq)]
pub enum Event<'a> {
Command(command::Command<'a>),
Reply(reply::Reply<'a>),
Connected,
Disconnected
}
impl<'a> Event<'a> {
pub fn to_static(&self) -> Event<'static> {
use Event::*;
match self {
&Command(ref c) => Command(c.to_static()),
_ => unimplemented!()
}
}
}
|