Add setter for custom data for error types
This commit is contained in:
parent
3ee8f26d1e
commit
46b3c7c024
1 changed files with 5 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue