[][src]Macro sugars::boxed

macro_rules! boxed {
    ($e:expr) => { ... };
    ($e:expr,) => { ... };
    ($($e:expr),+ $(,)?) => { ... };
}

A simple macro to make a new Box value.

It is also able to create tuples if given more than one parameter.

Example

use sugars::boxed;
assert_eq!(Box::new(10), boxed!(10));

// Tuple example
let (box_a, box_b) = boxed!(10, "my_str");
assert_eq!(Box::new(10), box_a);
assert_eq!(Box::new("my_str"), box_b);