newtype

Macro newtype 

Source
macro_rules! newtype {
    ($( #[$attrs:meta] )* $name:ident $( : $default:ty )?) => { ... };
}
Expand description

A macro for easy creation of newtypes.

ยงNote

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.