From 46b3c7c02450d306fa76941516b3b064d9aeb9fa Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 16 Jul 2016 16:46:56 +0200 Subject: [PATCH] Add setter for custom data for error types --- libimagerror/src/error_gen.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libimagerror/src/error_gen.rs b/libimagerror/src/error_gen.rs index 26f92772..c4cf7c27 100644 --- a/libimagerror/src/error_gen.rs +++ b/libimagerror/src/error_gen.rs @@ -78,6 +78,11 @@ macro_rules! generate_custom_error_types { self.err_type } + pub fn with_custom_data(mut self, custom: $customMemberTypeName) -> $name { + self.custom_data = Some(custom); + self + } + } impl Into<$name> for $kindname {