Skip to main content

impl_transparent_wrapper

Macro impl_transparent_wrapper 

Source
macro_rules! impl_transparent_wrapper {
    ($wrapper:ident<$inner:ident>) => { ... };
    ($module:ident::$wrapper:ident<$inner:ident>) => { ... };
}
Expand description

Implements the Type trait for transparent wrapper types.

This macro helps implement the Type trait for types that transparently wrap another type, like Box, Arc, Rc, Cell, etc.

§Examples

impl_transparent_wrapper!(Box<T>);
impl_transparent_wrapper!(Arc<T>);
impl_transparent_wrapper!(Cell<T>);