macro_rules! with_deep_view {
(
$(#[$exec_attr:meta])*
pub struct $exec_name:ident <$lt:lifetime> {
$(pub $exec_field:ident: $exec_ty:ty,)*
}
$(#[$spec_attr:meta])*
pub struct $spec_name:ident {
$(pub $spec_field:ident: $spec_ty:ty,)*
}
type $inner_name:ident;
) => { ... };
(
$(#[$exec_attr:meta])*
pub enum $exec_name:ident <$lt:lifetime> {
$($exec_variant:ident($exec_ty:ty),)*
}
$(#[$spec_attr:meta])*
pub enum $spec_name:ident {
$($spec_variant:ident($spec_ty:ty),)*
}
type $inner_name:ident;
) => { ... };
}Expand description
Defines paired executable/spec nominal value types and corresponding DeepView and SpecMapper impls.
The generated DeepView and SpecMapper implementations assume the exec and spec fields or
variants are aligned by name and order.