macro_rules! peapod {
    () => { ... };
    ($($elem:expr),+ $(,)?) => { ... };
}
Expand description

A nice way to generate a Peapod from a list of elements. If you’re familiar with the vec![] macro, this is Peapod’s equivalent.

#[derive(Phenotype)]
enum Test {
    A,
    B
}

let mut fast = peapod![Test::A, Test::B];

// is the same as

let mut slow = Peapod::with_capacity(2);
slow.push(Test::A);
slow.push(Test::B);