From dbbcf322c3a9c4ffa8c5bed9495cbdef02f35f03 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Tue, 6 Aug 2024 12:27:48 +0400 Subject: [PATCH] feat: add Status::num() for handy conversion enum->u8 --- src/status.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/status.rs b/src/status.rs index ca2c59e..9bf41b0 100644 --- a/src/status.rs +++ b/src/status.rs @@ -81,6 +81,10 @@ impl Status { self.status_code } + pub fn num(self: &Self) -> u8 { + self.status_code.into() + } + pub fn reply_type(self: &Self) -> ReplyType { self.reply_type }