Skip to main content

s_no_extra_traits

Macro s_no_extra_traits 

Source
macro_rules! s_no_extra_traits {
    ($(
        $(#$attr:tt)*
        $pub:vis $t:ident $i:ident { $($field:tt)* }
    )*) => { ... };
    (it: $(#$attr:tt)* $pub:vis union $i:ident { $($field:tt)* }) => { ... };
    (it: $(#$attr:tt)* $pub:vis struct $i:ident { $($field:tt)* }) => { ... };
}
Expand description

Implement Clone, Copy, and Debug for one or more structs/unions, but exclude PartialEq, Eq, and Hash.

Also mark the type with repr(C).

Most structs will prefer to use s.