1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use serde_repr::{Deserialize_repr, Serialize_repr};
#[derive(
Clone, Copy, Debug, Deserialize_repr, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize_repr,
)]
#[repr(u8)]
pub enum ResponseType {
Pong = 1,
ChannelMessageWithSource = 4,
DeferredChannelMessageWithSource = 5,
}
impl ResponseType {
pub const fn name(self) -> &'static str {
match self {
Self::Pong => "Pong",
Self::ChannelMessageWithSource => "ChannelMessageWithSource",
Self::DeferredChannelMessageWithSource => "DeferredChannelMessageWithSource",
}
}
}