1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use super::*;
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Ctcp<'t> {
Action,
Unknown {
command: Cow<'t, str>,
},
}
impl<'t> AsOwned for Ctcp<'t> {
type Owned = Ctcp<'static>;
fn as_owned(&self) -> Self::Owned {
match self {
Ctcp::Action => Ctcp::Action,
Ctcp::Unknown { command } => Ctcp::Unknown {
command: command.as_owned(),
},
}
}
}