I'm somewhat new to rust, and while I understand the logic behind a macro, for example this is a simplified version of the vec![] macro
macro_rules! vec {
() => (
$crate::vec::Vec::new()
);
($elem:expr; $n:expr) => (
$crate::vec::from_elem($elem, $n)
);
($($x:expr),+ $(,)?) => (
<[_]>::into_vec(
$crate::boxed::Box::new([$($x),+])
)
);
}
However I do not understand the syntax behind it, could anyone give a brief overview of it? Just the basics are fine. A million thanks!