Macro pci_struct

Source
macro_rules! pci_struct {
    (
        $(
            $(#[$attr:meta])*
            $vis:vis struct $name:ident<$lifetime:lifetime> $(: $length:literal)? {
                $(
                    $(#[$field_attr:meta])*
                    $field_name:ident @ $field_offset:literal :
                    $($field_type:ident)::+$(<$($field_generics:tt),+ $(,)?>)?
                ),* $(,)?
            }
        )*
    ) => { ... };
}
Expand description

TODO: Document.

The optional length is important mostly to make PciRegionSnapshot only copy the relevant part instead of a lot more.

TODO: Validate field offsets against length.