macro_rules! boxed { ($val:expr) => { ... }; }
Expand description
Creates a new Box
instance.
This macro takes an expression and wraps it in a Box
. It offers a more concise syntax compared to the standard Box::new
function.
ยงExamples
use std_macro_extensions::*;
let boxed_value = boxed!(10);