macro_rules! NewtypeSub {
    ((* $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    (($(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    ((& $($a:lifetime)? self $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    ((& $($a:lifetime)? self, & $($b:lifetime)? Self $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    (($(<$($($T:ident),+ $(,)?)?>)? & $($a:lifetime)? self, $Rhs:ty $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    ((<$($lt:lifetime),+ $(, $($T:ident),+)? $(,)?> & $($a:lifetime)? self, $Rhs:ty $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    ((& $($a:lifetime)? Self $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    (($(<$($($T:ident),+ $(,)?)?>)? $Rhs:ty $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
    ((<$($lt:lifetime),+ $(, $($T:ident),+)? $(,)?> $Rhs:ty $(where $($bound:tt)*)?) $vis:vis struct $name:ident $($token:tt)+) => { ... };
}
Expand description

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

Accepts input in any of following forms:

(
    *
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    & $($a:lifetime)? self
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    & $($a:lifetime)? self, & $($b:lifetime)? Self
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    $(<$($($T:ident),+ $(,)?)?>)?
    & $($a:lifetime)? self, $Rhs:ty
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    <$($lt:lifetime),+ $(, $($T:ident),+)? $(,)?>
    & $($a:lifetime)? self, $Rhs:ty
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    & $($a:lifetime)? Self
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    $(<$($($T:ident),+ $(,)?)?>)?
    $Rhs:ty
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);
(
    <$($lt:lifetime),+ $(, $($T:ident),+)? $(,)?>
    $Rhs:ty
    $(where $($bound:tt)*)?
)
$vis:vis struct $name:ident $(<$generics> $(where $where_clause)?)? (
    $(pub)? $t0:ty $(, $(pub)? $phantom:ty)* $(,)?
);