use randerive::{Rand}; use rand::distributions::{Standard, Distribution}; #[derive(Debug, Rand)] pub struct Vec2 { pub x: T, pub y: T } #[derive(Debug, Rand)] pub struct Mat2 { pub x: Vec2, pub y: Vec2 } fn main () { let test : Mat2 = rand::random(); print!("{:?}", test) }