[][src]Macro impl_twice::impl_twice

macro_rules! impl_twice {
    () => { ... };
    (impl $(<$($gen_args:tt),*>)?
        $name1:ident$(<$($name1_param:tt),*>)?,
        $name2:ident$(<$($name2_param:tt),*>)?
        $(where ($($where_args:tt)*))? {
            $($content:item)*
    }$($extra:tt)*) => { ... };
    (impl $(<$($gen_args:tt),*>)?
        $name1:ident$(<$($name1_param:tt),*>)?
        $(where ($($where_args:tt)*))?
     impl $(<$($gen_args2:tt),*>)?
        $name2:ident$(<$($name2_param:tt),*>)?
        $(where ($($where_args2:tt)*))? {
            $($content:item)*
    }$($extra:tt)*) => { ... };
    (impl $(<$($gen_args:tt),*>)?
        $trait:ident$(<$($trait_param:tt),*>)? for
        $name1:ident$(<$($name1_param:tt),*>)?,
        $name2:ident$(<$($name2_param:tt),*>)?
        $(where ($($where_args:tt)*))? {
            $($content:item)*
    }$($extra:tt)*) => { ... };
    (impl $(<$($gen_args:tt),*>)?
        $trait:ident$(<$($trait_param:tt),*>)? for
        $name1:ident$(<$($name1_param:tt),*>)?
        $(where ($($where_args:tt)*))?
     impl $(<$($gen_args2:tt),*>)?
        $trait2:ident$(<$($trait_param2:tt),*>)? for
        $name2:ident$(<$($name2_param:tt),*>)?
        $(where ($($where_args2:tt)*))? {
            $($content:item)*
    }$($extra:tt)*) => { ... };
}

A macro for avoiding code duplication for immutable and mutable types. Check out the crate level documentation for more information