From now on we are going to be mainly using this doc as a reference: Link. This is a very useful document that teaches us how to use Rust by examples. There are certain elements to Rust that is different than traditional languages. We are going to talk about some of the more notable parts of them.
Macros
One of the important concepts in Rust are macros. As we saw in the previous post, anything ending with a ! is a macro. There are certain macros built in such as println!, but we can also create our own macros. For example:
// This is a simple macro named `say_hello`.
macro_rules! say_hello {
// `()` indicates that the macro takes no argument.
() => {