macro_rules! newtype {
($( #[$attrs:meta] )* $name:ident $( : $default:ty )?) => { ... };
}
A macro for easy creation of newtype
s.
Newtypes created by this macro are sealed
, meaning they do not
implement AsMut
, AsRef
, Deref
, or DerefMut
.
Doing so would invalidate any use of a newtype
.