diff --git a/libimagstore/src/hook/error.rs b/libimagstore/src/hook/error.rs index 1db64c59..956f681e 100644 --- a/libimagstore/src/hook/error.rs +++ b/libimagstore/src/hook/error.rs @@ -1,4 +1,6 @@ use std::convert::Into; +use std::default::Default; + generate_error_imports!(); generate_custom_error_types!(HookError, HookErrorKind, CustomData, @@ -12,6 +14,25 @@ pub struct CustomData { aborting: bool, } +impl CustomData { + + pub fn aborting(mut self, b: bool) -> CustomData { + self.aborting = b; + self + } + +} + +impl Default for CustomData { + + fn default() -> CustomData { + CustomData { + aborting: true + } + } + +} + impl HookError { pub fn is_aborting(&self) -> bool {