macro_rules! NewtypeIndex {
    (($(<$($($T:ident),+ $(,)?)?>)? $Index:ty $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    ((<$($lt:lifetime),+ $(, $($T:ident),+)? $(,)?> $Index:ty $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
}
Expand description

Derives Index trait implementation for newtype wrappers (i.e. tuple structs with a single non-zero sized element).

Accepts input in any of following forms:

(
    $(<$($($T:ident),+ $(,)?)?>)?
    $Index:ty
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    <$($lt:lifetime),+ $(, $($T:ident),+)? $(,)?>
    $Index:ty
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);