From 2da5bc8039d750336da5636f76d3c1acbbc4d874 Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Wed, 21 May 2025 12:12:42 +0530 Subject: [PATCH] applayer: add bool status check fns --- rust/src/applayer.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/src/applayer.rs b/rust/src/applayer.rs index d09619e2cb..e533638ee8 100644 --- a/rust/src/applayer.rs +++ b/rust/src/applayer.rs @@ -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 }