Add setter for custom data for error types

This commit is contained in:
Matthias Beyer 2016-07-16 16:46:56 +02:00
parent 3ee8f26d1e
commit 46b3c7c024

View file

@ -78,6 +78,11 @@ macro_rules! generate_custom_error_types {
self.err_type self.err_type
} }
pub fn with_custom_data(mut self, custom: $customMemberTypeName) -> $name {
self.custom_data = Some(custom);
self
}
} }
impl Into<$name> for $kindname { impl Into<$name> for $kindname {