]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
applayer: add bool status check fns
authorShivani Bhardwaj <shivani@oisf.net>
Wed, 21 May 2025 06:42:42 +0000 (12:12 +0530)
committerVictor Julien <victor@inliniac.net>
Wed, 21 May 2025 17:42:06 +0000 (19:42 +0200)
rust/src/applayer.rs

index d09619e2cba63dd11e929e07e76d70022c0f1452..e533638ee8c9db22dc631a5ad9718036044a501a 100644 (file)
@@ -347,6 +347,14 @@ impl AppLayerResult {
         };
     }
 
+    pub fn is_ok(self) -> bool {
+        self.status == 0
+    }
+
+    pub fn is_err(self) -> bool {
+        self.status == -1
+    }
+
     pub fn is_incomplete(self) -> bool {
         self.status == 1
     }