October 2019
Intermediate to advanced
444 pages
10h 37m
English
You'll know how to use parameter ranges after these few steps:
#![allow(unused_macros)]macro_rules! set { ( $( $item:expr ),* ) => { { let mut s = HashSet::new(); $( s.insert($item); )* s } };}
macro_rules! dto { ($name: ident, $($variant: ident => $type:ty),+) => { #[derive(PartialEq, Clone, Debug)] pub struct $name { $(pub $variant: $type),+ } impl $name { pub fn new($($variant:$type),+) -> Self { $name { $($variant: $variant),+ } } } };}
Read now
Unlock full access