Crate fake_inheritance [−] [src]
A little utility macro for a "faked" inheritance. It generates shortcuts from the inner struct's fields to the parent struct, to make the access of these fields easier to use. But with minimal effort.
Input of this macro follows: (parent_struct_name, field_name_for_inner_struct, fields = [
field_name: field_type; ...]) (The ... indicates that the pattern can be used infinitely).
For the macro to use the inner struct's accesor functions (e. g