feat: add Status::num() for handy conversion enum->u8

This commit is contained in:
DarkCat09 2024-08-06 12:27:48 +04:00
parent 6bd101504d
commit dbbcf322c3
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

View file

@ -81,6 +81,10 @@ impl Status {
self.status_code self.status_code
} }
pub fn num(self: &Self) -> u8 {
self.status_code.into()
}
pub fn reply_type(self: &Self) -> ReplyType { pub fn reply_type(self: &Self) -> ReplyType {
self.reply_type self.reply_type
} }