app-layer: add methods to get status from AppLayerResult

pull/5000/head
Victor Julien 5 years ago
parent 6373071aa3
commit b0288da686

@ -62,6 +62,16 @@ impl AppLayerResult {
needed: needed, needed: needed,
}; };
} }
pub fn is_ok(self) -> bool {
self.status == 0
}
pub fn is_incomplete(self) -> bool {
self.status == 1
}
pub fn is_err(self) -> bool {
self.status == -1
}
} }
impl From<bool> for AppLayerResult { impl From<bool> for AppLayerResult {

Loading…
Cancel
Save