summaryrefslogtreecommitdiff
path: root/packet/src/result.rs
diff options
context:
space:
mode:
Diffstat (limited to 'packet/src/result.rs')
-rw-r--r--packet/src/result.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/packet/src/result.rs b/packet/src/result.rs
deleted file mode 100644
index f33bd7d..0000000
--- a/packet/src/result.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-#[derive(Copy, Clone, Debug, PartialEq, Eq)]
-pub enum ResultCode {
- NOERROR = 0,
- FORMERR = 1,
- SERVFAIL = 2,
- NXDOMAIN = 3,
- NOTIMP = 4,
- REFUSED = 5,
-}
-
-impl ResultCode {
- pub fn from_num(num: u8) -> Self {
- match num {
- 1 => Self::FORMERR,
- 2 => Self::SERVFAIL,
- 3 => Self::NXDOMAIN,
- 4 => Self::NOTIMP,
- 5 => Self::REFUSED,
- 0 | _ => Self::NOERROR,
- }
- }
-} \ No newline at end of file