Construct arrays of mixed types. Generic enums are created for up to 12 unique types. A macro to generate an array using the correct size macro is provided.
Include in the Cargo.toml
file:
toml
[dependencies]
mixed_array = "0.1.0"
Import and use the mixed_array
macro to create an array of items
```rust
use mixedarray::mixedarray;
use std::cmp::Ordering;
// define a struct with a generic so the generated types are different as a demo
struct Item
impl
//implement ordering for our item for any T
impl
impl
impl
fn main() {
//can now create an array of different types
let items = mixed_array![
Item::<&str> {
id: 100,
value: "blah",
},
Item::
dbg!(items.into_iter().min());
} ```