Declarative macros are used to transform an expression into another code.
They end with an exclamation mark (!).
In the following example, the vec! macro is used to create a vector of
integers:
let v: Vec<u32> = vec![1, 2, 3];
v[1, 2, 3]Declarative macros are used to transform an expression into another code.
They end with an exclamation mark (!).
In the following example, the vec! macro is used to create a vector of
integers:
let v: Vec<u32> = vec![1, 2, 3];
v[1, 2, 3]