aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/status.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-06 17:37:35 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-06 17:37:35 +0200
commit7aa211a8d7ae2efeebd9362699a1aea4b5690e3d (patch)
treee0af8720ee3b770688600a8ea025de2ce81e5017 /src/encoding/status.rs
parent7177367ae41a5e2d6ed401f60ee1455812dd8ffb (diff)
downloadsip-rs-7aa211a8d7ae2efeebd9362699a1aea4b5690e3d.tar
sip-rs-7aa211a8d7ae2efeebd9362699a1aea4b5690e3d.tar.bz2
sip-rs-7aa211a8d7ae2efeebd9362699a1aea4b5690e3d.tar.zst
start on sdp impl
Diffstat (limited to 'src/encoding/status.rs')
-rw-r--r--src/encoding/status.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/status.rs b/src/encoding/status.rs
index 9fe03d7..61b2d2a 100644
--- a/src/encoding/status.rs
+++ b/src/encoding/status.rs
@@ -1,6 +1,6 @@
macro_rules! status_enum {
($v:vis enum $name:ident { $($variant:ident = $value:literal),*, }) => {
- #[derive(Debug, Clone)]
+ #[derive(Debug, Clone, Eq, PartialEq, Hash)]
$v enum $name { $($variant),*, Other(u16) }
impl $name { pub fn from_code(c: u16) -> Self { match c { $($value => Self::$variant),*, x => Self::Other(x) } } }
impl $name { pub fn to_code(&self) -> u16 { match self { $(Self::$variant => $value),*, Self::Other(x) => *x } } }